@@ -886,6 +886,12 @@ def test_all_classes_ordered_by(sv_ordering_tests: SchemaView, ordered_by: str)
886886 assert list (sv_ordering_tests .all_classes (ordered_by = ordered_by ).keys ()) == ORDERING_TESTS [ordered_by ]
887887
888888
889+ @pytest .fixture (scope = "session" )
890+ def schema_view_inlined () -> SchemaView :
891+ """Fixture for a SchemaView for testing attribute edge cases."""
892+ return SchemaView (os .path .join (INPUT_DIR , "schemaview_is_inlined.yaml" ))
893+
894+
889895def test_children_method (schema_view_no_imports : SchemaView ) -> None :
890896 """Test retrieval of the children of a class."""
891897 view = schema_view_no_imports
@@ -1478,12 +1484,10 @@ def test_materialize_patterns_attribute() -> None:
14781484 ("inlined_as_list_integer" , False ),
14791485 ],
14801486)
1481- def test_is_inlined (slot_name : str , expected_result : bool ) -> None :
1487+ def test_is_inlined (schema_view_inlined : SchemaView , slot_name : str , expected_result : bool ) -> None :
14821488 """Tests for slots being inlined or not."""
1483- schema_path = os .path .join (INPUT_DIR , "schemaview_is_inlined.yaml" )
1484- sv = SchemaView (schema_path )
1485- slot = sv .get_slot (slot_name )
1486- assert sv .is_inlined (slot ) == expected_result
1489+ slot = schema_view_inlined .get_slot (slot_name )
1490+ assert schema_view_inlined .is_inlined (slot ) == expected_result
14871491
14881492
14891493def test_materialize_nonscalar_slot_usage () -> None :
0 commit comments