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 reorg (continued) #1788

Merged
merged 3 commits into from Apr 4, 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
6 changes: 0 additions & 6 deletions test/a.n3

This file was deleted.

File renamed without changes.
103 changes: 0 additions & 103 deletions test/store_performance.py

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from io import StringIO
import unittest

from .testutils import GraphHelper
from test.testutils import GraphHelper


def get_digest_value(rdf, mimetype):
Expand Down
2 changes: 1 addition & 1 deletion test/test_diff.py → test/test_graph/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from rdflib.namespace import RDF, FOAF
from rdflib import Graph
from rdflib.term import Node, BNode, Literal
from .testutils import GraphHelper
from test.testutils import GraphHelper

"""Test for graph_diff - much more extensive testing
would certainly be possible"""
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_variants.py → test/test_graph/test_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from rdflib.term import URIRef
from rdflib.util import guess_format

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

# Put files from other directories in here.
Expand Down
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.
2 changes: 1 addition & 1 deletion test/test_plugins.py → test/test_misc/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from rdflib import Graph
from rdflib.parser import Parser

TEST_DIR = Path(__file__).parent
TEST_DIR = Path(__file__).parent.parent
TEST_PLUGINS_DIR = TEST_DIR / "plugins"


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def test_definednamespace_creator_qb():
Tests basic use of DefinedNamespace creator script using QB
"""

definednamespace_script = Path(__file__).parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent / "defined_namespaces" / "qb.ttl"
definednamespace_script = Path(__file__).parent.parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent.parent / "defined_namespaces" / "qb.ttl"
print("\n")
print(f"Using {definednamespace_script}...")
print(f"Testing {qb_data_file}...")
Expand Down Expand Up @@ -48,8 +48,8 @@ def test_definednamespace_creator_fake():
RDF file of unknonwn type
"""

definednamespace_script = Path(__file__).parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent / "defined_namespaces" / "fake.xxx"
definednamespace_script = Path(__file__).parent.parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent.parent / "defined_namespaces" / "fake.xxx"
print("\n")
print(f"Using {definednamespace_script}...")
print(f"Testing {qb_data_file}...(expected to fail)")
Expand All @@ -74,8 +74,8 @@ def test_definednamespace_creator_bad_ns():
supplied namespace doesn't end in # or /
"""

definednamespace_script = Path(__file__).parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent / "defined_namespaces" / "fake.xxx"
definednamespace_script = Path(__file__).parent.parent.parent / "rdflib" / "tools" / "defined_namespace_creator.py"
qb_data_file = Path(__file__).parent.parent / "defined_namespaces" / "fake.xxx"
print("\n")
print(f"Using {definednamespace_script}...")
print(f"Testing {qb_data_file}...(expected to fail - bad NS given)")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
77 changes: 0 additions & 77 deletions test/test_rules.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from rdflib.compare import isomorphic

import unittest
from .testutils import eq_
from test.testutils import eq_

class TestConstructInitBindings(unittest.TestCase):
def test_construct_init_bindings(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rdflib.plugins.sparql import prepareQuery
from rdflib.compare import isomorphic
import rdflib
from .testutils import eq_
from test.testutils import eq_
from pprint import pprint
import io

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from rdflib import Variable, Literal

from .testutils import eq_ as eq
from test.testutils import eq_ as eq


def _eval(e, ctx=None):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_prepare_query():

g = Graph()
g.parse(
location=os.path.join(os.path.dirname(__file__), "..", "examples", "foaf.n3"),
location=os.path.join(os.path.dirname(__file__), "..", "..", "examples", "foaf.n3"),
format="n3",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from rdflib.plugins.sparql import prepareQuery
from rdflib.compare import isomorphic

from . import helper
from test import helper


def test_service():
Expand Down
2 changes: 1 addition & 1 deletion test/test_sparql.py → test/test_sparql/test_sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rdflib.compare import isomorphic
from rdflib.term import Variable

from .testutils import eq_
from test.testutils import eq_


def test_graph_prefix():
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@pytest.fixture
def data_path() -> Path:
return Path(__file__).parent / "translate_algebra"
return Path(__file__).parent.parent / "translate_algebra"


@dataclass
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_csv2rdf.py → test/test_tools/test_csv2rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class CSV2RDFTest(unittest.TestCase):
def setUp(self):
self.REALESTATE_FILE_PATH = Path(__file__).parent / "csv" / "realestate.csv"
self.REALESTATE_FILE_PATH = Path(__file__).parent.parent / "consistent_test_data" / "csv" / "realestate.csv"

def test_csv2rdf_cli(self):
completed = subprocess.run(
Expand Down