Skip to content

Commit

Permalink
chore: add test to ensure all supported ontologies are supported by C…
Browse files Browse the repository at this point in the history
…OG API (#236)
  • Loading branch information
nayib-jose-gloria authored Oct 23, 2024
1 parent 2e1a834 commit 56051f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/python/tests/test_entities.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from cellxgene_ontology_guide.entities import Ontology
from cellxgene_ontology_guide.supported_versions import load_supported_versions


def test_all_supported_ontologies_in_dataclass():
"""
Test that all supported ontologies are defined in the Ontology enum (and deprecated ontologies removed).
Do not include additional ontologies.
"""
ontology_info = load_supported_versions()
supported_ontologies = set()
for _, version_info in ontology_info.items():
for ontology, _ in version_info["ontologies"].items():
supported_ontologies.add(ontology)

assert supported_ontologies == {ontology.name for ontology in Ontology}

0 comments on commit 56051f9

Please sign in to comment.