diff --git a/tests/test_utils_directory_layout.py b/tests/test_utils_directory_layout.py index a2b676654..0040e5f2c 100644 --- a/tests/test_utils_directory_layout.py +++ b/tests/test_utils_directory_layout.py @@ -5,14 +5,14 @@ from ontopy.utils import directory_layout -# Requires that we have EMMO checked out locally -if False: - emmo = get_ontology("../EMMO/emmo.ttl").load() +def test_emmo_directory_layout(): + emmo = get_ontology( + "https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta4/emmo.ttl" + ).load() layout = directory_layout(emmo) # Map base IRIs to ontologies for easy access to all sub-ontologies omap = {o.base_iri: o for o in layout.keys()} - # Base IRI of EMMO should not end with slash (/) !!! assert layout[omap["http://emmo.info/emmo/"]] == "emmo" @@ -32,10 +32,6 @@ layout[omap["http://emmo.info/emmo/disciplines/math#"]] == "disciplines/math" ) - assert ( - layout[omap["http://emmo.info/emmo/disciplines/units/siunits#"]] - == "disciplines/units/siunits" - ) assert ( layout[omap["http://emmo.info/emmo/mereocausality#"]] == "mereocausality/mereocausality" @@ -60,17 +56,13 @@ layout[omap["http://emmo.info/emmo/disciplines/math#"]] == "disciplines/math" ) - assert ( - layout[omap["http://emmo.info/emmo/disciplines/units/siunits#"]] - == "disciplines/units/siunits" - ) assert ( layout[omap["http://emmo.info/emmo/mereocausality#"]] == "mereocausality/mereocausality" ) -if True: +def test_local_directory_layout(): thisdir = Path(__file__).resolve().parent ontopath = thisdir / "testonto" / "testonto.ttl" onto = get_ontology(ontopath).load()