File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ def schema_view_attributes() -> SchemaView:
62
62
"""Fixture for a SchemaView for testing attribute edge cases."""
63
63
return SchemaView (os .path .join (INPUT_DIR , "attribute_edge_cases.yaml" ))
64
64
65
+ @pytest .fixture (scope = "session" )
66
+ def schema_view_inlined () -> SchemaView :
67
+ """Fixture for a SchemaView for testing attribute edge cases."""
68
+ return SchemaView (os .path .join (INPUT_DIR , "schemaview_is_inlined.yaml" ))
69
+
65
70
66
71
def test_children_method (schema_view_no_imports : SchemaView ) -> None :
67
72
"""Test retrieval of the children of a class."""
@@ -930,11 +935,10 @@ def test_mergeimports() -> None:
930
935
],
931
936
)
932
937
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 :
You can’t perform that action at this time.
0 commit comments