From 09fcba8e3bb574bf47f0bd03829eb1beab7c3a55 Mon Sep 17 00:00:00 2001 From: "Francesca L. Bleken" <48128015+francescalb@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:46:30 +0200 Subject: [PATCH] Load doamin-battery instead of battinfo which is just an extra wrapping (#745) # Description This should deprecate PR #741 in which the tests where removed, also incorrectly. ## Type of change - [ ] Bug fix. - [ ] New feature. - [ ] Documentation update. - [ ] Test update. ## Checklist This checklist can be used as a help for the reviewer. - [ ] Is the code easy to read and understand? - [ ] Are comments for humans to read, not computers to disregard? - [ ] Does a new feature has an accompanying new test (in the CI or unit testing schemes)? - [ ] Has the documentation been updated as necessary? - [ ] Does this close the issue? - [ ] Is the change limited to the issue? - [ ] Are errors handled for all outcomes? - [ ] Does the new feature provide new restrictions on dependencies, and if so is this documented? ## Comments --- tests/test_get_by_label.py | 5 ++++- tests/test_load.py | 7 ++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_get_by_label.py b/tests/test_get_by_label.py index 5b84a5281..669ad9715 100644 --- a/tests/test_get_by_label.py +++ b/tests/test_get_by_label.py @@ -109,8 +109,11 @@ def test_get_by_label_emmo(emmo: "Ontology") -> None: assert emmo[emmo.Atom.iri] == emmo.Atom # Load an ontology with imported sub-ontologies + # Note that this test also includes testing of loading + # ontology with catalog file directly from the web + # It is therefore not duplicated in test_load. onto = get_ontology( - "https://raw.githubusercontent.com/BIG-MAP/BattINFO/master/battinfo.ttl" + "https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl" ).load() assert onto.Electrolyte.prefLabel.en.first() == "Electrolyte" diff --git a/tests/test_load.py b/tests/test_load.py index bb5f04223..35c911fd3 100755 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -35,11 +35,8 @@ def test_load(repo_dir: "Path", testonto: "Ontology") -> None: assert str(testonto.TestClass.prefLabel.first()) == "TestClass" # Use catalog file when downloading from web - onto = get_ontology( - "https://raw.githubusercontent.com/BIG-MAP/BattINFO/master/" - "battinfo.ttl" - ).load() - assert str(onto.Electrolyte.prefLabel.first()) == "Electrolyte" + # This is tested in test_get_by_label in which some additional tests + # are performed on labels. with pytest.raises( EMMOntoPyException,