@@ -63,6 +63,12 @@ def schema_view_attributes() -> SchemaView:
63
63
return SchemaView (os .path .join (INPUT_DIR , "attribute_edge_cases.yaml" ))
64
64
65
65
66
+ @pytest .fixture (scope = "session" )
67
+ def schema_view_inlined () -> SchemaView :
68
+ """Fixture for a SchemaView for testing attribute edge cases."""
69
+ return SchemaView (os .path .join (INPUT_DIR , "schemaview_is_inlined.yaml" ))
70
+
71
+
66
72
def test_children_method (schema_view_no_imports : SchemaView ) -> None :
67
73
"""Test retrieval of the children of a class."""
68
74
view = schema_view_no_imports
@@ -929,12 +935,10 @@ def test_mergeimports() -> None:
929
935
("inlined_as_list_integer" , False ),
930
936
],
931
937
)
932
- def test_is_inlined (slot_name : str , expected_result : bool ) -> None :
938
+ def test_is_inlined (schema_view_inlined : SchemaView , slot_name : str , expected_result : bool ) -> None :
933
939
"""Tests for slots being inlined or not."""
934
- schema_path = os .path .join (INPUT_DIR , "schemaview_is_inlined.yaml" )
935
- sv = SchemaView (schema_path )
936
- slot = sv .get_slot (slot_name )
937
- assert sv .is_inlined (slot ) == expected_result
940
+ slot = schema_view_inlined .get_slot (slot_name )
941
+ assert schema_view_inlined .is_inlined (slot ) == expected_result
938
942
939
943
940
944
def test_materialize_nonscalar_slot_usage () -> None :
0 commit comments