@@ -718,7 +718,7 @@ def test_metamodel_in_schemaview() -> None:
718718 for tn in ["uriorcurie" , "string" , "float" ]:
719719 assert tn in view .all_types ()
720720 assert tn not in view .all_types (imports = False )
721- for cn , c in view .all_classes (). items ():
721+ for cn in view .all_classes ():
722722 uri = view .get_uri (cn , expand = True )
723723 assert uri is not None
724724 if cn not in ["structured_alias" , "UnitOfMeasure" , "ValidationReport" , "ValidationResult" ]:
@@ -1598,7 +1598,7 @@ def test_type_roots(schema: str, type_roots: set[str]) -> None:
15981598
15991599
16001600def test_all_enums (schema_view_with_imports : SchemaView ) -> None :
1601- """Test all_enums"""
1601+ """Test all_enums. """
16021602 view = schema_view_with_imports
16031603
16041604 for en , e in view .all_enums ().items ():
@@ -1809,6 +1809,7 @@ def gen_schema_name(range_tuple: tuple[str, str | None, str | None]) -> str | No
18091809
18101810def gen_range_file_with_default (range_id : str , tmp_path_factory : pytest .TempPathFactory ) -> Path :
18111811 """Generate a copy of the range file with a default_range added and return the path.
1812+
18121813 Obviates the need for maintaining a copy with a default_range tagged to the end.
18131814
18141815 :param range_id: the range file to use; must be one of RL, RI
@@ -2232,28 +2233,28 @@ def test_permissible_value_relationships(schema_view_no_imports: SchemaView) ->
22322233 pv_cat = animal_enum .permissible_values ["CAT" ]
22332234 assert pv_cat .text == "CAT"
22342235 assert pv_cat .is_a is None
2235- assert view .permissible_value_parent ("CAT" , animals ) == []
2236+ assert view .permissible_value_parents ("CAT" , animals ) == []
22362237 assert view .permissible_value_ancestors ("CAT" , animals ) == ["CAT" ]
22372238 assert set (view .permissible_value_children ("CAT" , animals )) == {"LION" , "TABBY" }
22382239 assert set (view .permissible_value_descendants ("CAT" , animals )) == {"CAT" , "LION" , "ANGRY_LION" , "TABBY" }
22392240
22402241 pv_tabby = animal_enum .permissible_values ["TABBY" ]
22412242 assert pv_tabby .is_a == "CAT"
2242- assert view .permissible_value_parent ("TABBY" , animals ) == ["CAT" ]
2243+ assert view .permissible_value_parents ("TABBY" , animals ) == ["CAT" ]
22432244 assert view .permissible_value_ancestors ("TABBY" , animals ) == ["TABBY" , "CAT" ]
22442245 assert view .permissible_value_children ("TABBY" , animals ) == []
22452246 assert view .permissible_value_descendants ("TABBY" , animals ) == ["TABBY" ]
22462247
22472248 pv_lion = animal_enum .permissible_values ["LION" ]
22482249 assert pv_lion .is_a == "CAT"
2249- assert view .permissible_value_parent ("LION" , animals ) == ["CAT" ]
2250+ assert view .permissible_value_parents ("LION" , animals ) == ["CAT" ]
22502251 assert view .permissible_value_ancestors ("LION" , animals ) == ["LION" , "CAT" ]
22512252 assert view .permissible_value_children ("LION" , animals ) == ["ANGRY_LION" ]
22522253 assert view .permissible_value_descendants ("LION" , animals ) == ["LION" , "ANGRY_LION" ]
22532254
22542255 pv_angry_lion = animal_enum .permissible_values ["ANGRY_LION" ]
22552256 assert pv_angry_lion .is_a == "LION"
2256- assert view .permissible_value_parent ("ANGRY_LION" , animals ) == ["LION" ]
2257+ assert view .permissible_value_parents ("ANGRY_LION" , animals ) == ["LION" ]
22572258 assert view .permissible_value_ancestors ("ANGRY_LION" , animals ) == ["ANGRY_LION" , "LION" , "CAT" ]
22582259 assert view .permissible_value_children ("ANGRY_LION" , animals ) == []
22592260 assert view .permissible_value_descendants ("ANGRY_LION" , animals ) == ["ANGRY_LION" ]
0 commit comments