diff --git a/api/python/tests/test_entities.py b/api/python/tests/test_entities.py new file mode 100644 index 00000000..0ccdbc82 --- /dev/null +++ b/api/python/tests/test_entities.py @@ -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}