Skip to content

Commit 56051f9

Browse files
chore: add test to ensure all supported ontologies are supported by COG API (#236)
1 parent 2e1a834 commit 56051f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

api/python/tests/test_entities.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from cellxgene_ontology_guide.entities import Ontology
2+
from cellxgene_ontology_guide.supported_versions import load_supported_versions
3+
4+
5+
def test_all_supported_ontologies_in_dataclass():
6+
"""
7+
Test that all supported ontologies are defined in the Ontology enum (and deprecated ontologies removed).
8+
Do not include additional ontologies.
9+
"""
10+
ontology_info = load_supported_versions()
11+
supported_ontologies = set()
12+
for _, version_info in ontology_info.items():
13+
for ontology, _ in version_info["ontologies"].items():
14+
supported_ontologies.add(ontology)
15+
16+
assert supported_ontologies == {ontology.name for ontology in Ontology}

0 commit comments

Comments
 (0)