diff --git a/tests/ontopy_tests/test_reasoner.py b/tests/ontopy_tests/test_reasoner.py index 136b69507..854202ca3 100755 --- a/tests/ontopy_tests/test_reasoner.py +++ b/tests/ontopy_tests/test_reasoner.py @@ -7,33 +7,44 @@ from ontopy.ontology import Ontology -def test_sync_reasoner_hermit() -> None: +def test_sync_reasoner_hermit(repo_dir: "Path") -> None: """Test `ontopy:Ontology.sync_reasoner()` with HermiT.""" from ontopy import get_ontology - testonto = get_ontology("../testonto/testonto_for_reasoner.ttl") - print(testonto) + testonto = get_ontology( + repo_dir / "tests" / "testonto" / "testonto_for_reasoner.ttl" + ).load() + assert testonto.Avocado + assert not isinstance(testonto.Avocado, testonto.NaturalDye) testonto.sync_reasoner(reasoner="HermiT") + assert isinstance(testonto.Avocado, testonto.NaturalDye) -def test_sync_reasoner_pellet() -> None: +def test_sync_reasoner_pellet(repo_dir: "Path") -> None: """Test `ontopy:Ontology.sync_reasoner()` with Pellet""" from ontopy import get_ontology - testonto = get_ontology("../testonto/testonto_for_reasoner.ttl") - print(testonto) + testonto = get_ontology( + repo_dir / "tests" / "testonto" / "testonto_for_reasoner.ttl" + ).load() + assert testonto.Avocado + assert not isinstance(testonto.Avocado, testonto.NaturalDye) testonto.sync_reasoner(reasoner="Pellet") + assert isinstance(testonto.Avocado, testonto.NaturalDye) -def test_sync_reasoner_fact() -> None: +def test_sync_reasoner_fact(repo_dir: "Path") -> None: """Test `ontopy:Ontology.sync_reasoner()` with FaCT++""" from ontopy import get_ontology - testonto = get_ontology("../testonto/testonto_for_reasoner.ttl") - print(testonto) - + testonto = get_ontology( + repo_dir / "tests" / "testonto" / "testonto_for_reasoner.ttl" + ).load() + assert testonto.Avocado + assert not isinstance(testonto.Avocado, testonto.NaturalDye) testonto.sync_reasoner(reasoner="FaCT++") + assert isinstance(testonto.Avocado, testonto.NaturalDye) def test_sync_reasoner_wrong(testonto: "Ontology") -> None: