@@ -886,6 +886,12 @@ def test_all_classes_ordered_by(sv_ordering_tests: SchemaView, ordered_by: str)
886
886
assert list (sv_ordering_tests .all_classes (ordered_by = ordered_by ).keys ()) == ORDERING_TESTS [ordered_by ]
887
887
888
888
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
+
889
895
def test_children_method (schema_view_no_imports : SchemaView ) -> None :
890
896
"""Test retrieval of the children of a class."""
891
897
view = schema_view_no_imports
@@ -1478,12 +1484,10 @@ def test_materialize_patterns_attribute() -> None:
1478
1484
("inlined_as_list_integer" , False ),
1479
1485
],
1480
1486
)
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 :
1482
1488
"""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
1487
1491
1488
1492
1489
1493
def test_materialize_nonscalar_slot_usage () -> None :
0 commit comments