Skip to content

Commit

Permalink
Fix: formatting issues in test_json_schema_util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AvaniSiddhapuraAPT committed Feb 28, 2024
1 parent c8c9a9d commit 0e498c0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions metadata-ingestion/tests/unit/schema/test_json_schema_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_json_schema_with_recursion():
},
}
fields = list(JsonSchemaTranslator.get_fields_from_schema(schema))

expected_field_paths = [
{
"path": "[version=2.0].[type=TreeNode].[type=integer].value",
Expand Down Expand Up @@ -380,7 +380,7 @@ def test_nested_arrays():
"[version=2.0].[type=NestedArray].[type=array].[type=array].[type=Foo].ar",
"[version=2.0].[type=NestedArray].[type=array].[type=array].[type=Foo].ar.[type=integer].a",
"[version=2.0].[type=NestedArray].[type=array].[type=array].ar",
"[version=2.0].[type=NestedArray].[type=array].ar"
"[version=2.0].[type=NestedArray].[type=array].ar",
]
assert_field_paths_match(fields, expected_field_paths)
assert isinstance(fields[0].type.type, ArrayTypeClass)
Expand Down Expand Up @@ -513,12 +513,11 @@ def test_needs_disambiguation_nested_union_of_records_with_same_field_name():
"[version=2.0].[type=ABFooUnion].[type=union].[type=array].[type=array].[type=Foo].a",
"[version=2.0].[type=ABFooUnion].[type=union].[type=array].[type=array].[type=Foo].a.[type=integer].f",
"[version=2.0].[type=ABFooUnion].[type=union].[type=array].[type=array].a",
"[version=2.0].[type=ABFooUnion].[type=union].[type=array].a"
"[version=2.0].[type=ABFooUnion].[type=union].[type=array].a",
]
assert_field_paths_match(fields, expected_field_paths)



def test_datahub_json_schemas_parses_okay(tmp_path):
"""This is more like an integration test that helps us exercise the complexity in parsing and catch unexpected regressions."""

Expand Down Expand Up @@ -592,7 +591,7 @@ def test_key_schema_handling():
"[version=2.0].[key=True].[type=ABFooUnion].[type=union].[type=array].[type=array].[type=Foo].a",
"[version=2.0].[key=True].[type=ABFooUnion].[type=union].[type=array].[type=array].[type=Foo].a.[type=number].f",
"[version=2.0].[key=True].[type=ABFooUnion].[type=union].[type=array].[type=array].a",
"[version=2.0].[key=True].[type=ABFooUnion].[type=union].[type=array].a"
"[version=2.0].[key=True].[type=ABFooUnion].[type=union].[type=array].a",
]
assert_field_paths_match(fields, expected_field_paths)
for f in fields:
Expand Down Expand Up @@ -678,7 +677,7 @@ def test_simple_array():
fields = list(JsonSchemaTranslator.get_fields_from_schema(schema))
expected_field_paths: List[str] = [
"[version=2.0].[type=ObjectWithArray].[type=array].[type=string].ar",
"[version=2.0].[type=ObjectWithArray].[type=array].ar"
"[version=2.0].[type=ObjectWithArray].[type=array].ar",
]
assert_field_paths_match(fields, expected_field_paths)
assert isinstance(fields[0].type.type, ArrayTypeClass)
Expand Down

0 comments on commit 0e498c0

Please sign in to comment.