Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: move test/variants into test/data #1862

Merged
merged 1 commit into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions test/test_graph/test_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
from dataclasses import dataclass, field
from pathlib import Path, PurePath
from test.data import TEST_DATA_DIR
from test.testutils import GraphHelper
from typing import (
ClassVar,
Expand All @@ -30,7 +31,7 @@
from rdflib.util import guess_format

TEST_DIR = Path(__file__).parent.parent.absolute()
VARIANTS_DIR = TEST_DIR / "variants"
VARIANTS_DIR = TEST_DATA_DIR / "variants"

# Put files from other directories in here.
EXTRA_FILES: List[Path] = []
Expand Down Expand Up @@ -132,7 +133,7 @@ def for_directory(


GRAPH_VARIANT_DICT = {
**GraphVariants.for_directory(VARIANTS_DIR, TEST_DIR),
**GraphVariants.for_directory(VARIANTS_DIR, TEST_DATA_DIR),
**GraphVariants.for_files(EXTRA_FILES, TEST_DIR),
}

Expand Down
11 changes: 5 additions & 6 deletions test/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

"""

TEST_DIR = Path(__file__).parent
NT_DATA_DIR = Path(TEST_DATA_DIR) / "suites" / "nt_misc"
INVALID_NT_FILES = {
# illegal literal as subject
Expand Down Expand Up @@ -287,11 +286,11 @@ def test_n3(checker: Callable[[str, str, Path], None], args: Tuple[str, str, Pat


EXTRA_FILES = [
(TEST_DIR / "variants" / "special_chars.nt", "ntriples"),
(TEST_DIR / "variants" / "xml_literal.rdf", "xml"),
(TEST_DIR / "variants" / "rdf_prefix.jsonld", "json-ld"),
(TEST_DIR / "variants" / "simple_quad.trig", "trig"),
(TEST_DIR / "variants" / "rdf11trig_eg2.trig", "trig"),
(TEST_DATA_DIR / "variants" / "special_chars.nt", "ntriples"),
(TEST_DATA_DIR / "variants" / "xml_literal.rdf", "xml"),
(TEST_DATA_DIR / "variants" / "rdf_prefix.jsonld", "json-ld"),
(TEST_DATA_DIR / "variants" / "simple_quad.trig", "trig"),
(TEST_DATA_DIR / "variants" / "rdf11trig_eg2.trig", "trig"),
(TEST_DATA_DIR / "example-lots_of_graphs.n3", "n3"),
(TEST_DATA_DIR / "issue156.n3", "n3"),
]
Expand Down