Skip to content

Commit

Permalink
Updates tests of getters in test_schema.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe committed Nov 27, 2024
1 parent 81a81ac commit 0ac51f7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/unit/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ def _make_one(self, *args, **kw):
def test_ctor_valid_input(self, type_system, expected):
result = self._make_one(type_system=type_system)

assert result._properties["typeSystem"] == expected
assert result.type_system == expected

def test_ctor_invalid_input(self):
with pytest.raises(TypeError) as e:
Expand Down Expand Up @@ -1293,15 +1293,15 @@ def test_ctor_valid_input(
output_format=output_format,
serde_info=serde_info,
)
assert storage_descriptor._properties["inputFormat"] == input_format
assert storage_descriptor._properties["locationUri"] == location_uri
assert storage_descriptor._properties["outputFormat"] == output_format
assert storage_descriptor.input_format == input_format
assert storage_descriptor.location_uri == location_uri
assert storage_descriptor.output_format == output_format
if serde_info is not None:
assert (
storage_descriptor._properties["serDeInfo"] == serde_info.to_api_repr()
storage_descriptor.serde_info == serde_info.to_api_repr()
)
else:
assert storage_descriptor._properties["serDeInfo"] == serde_info
assert storage_descriptor.serde_info == serde_info

@pytest.mark.parametrize(
"input_format,location_uri,output_format,serde_info",
Expand Down Expand Up @@ -1397,9 +1397,9 @@ def test_ctor_valid_input(self, serialization_library, name, parameters):
name=name,
parameters=parameters,
)
assert serde_info._properties["serializationLibrary"] == serialization_library
assert serde_info._properties["name"] == name
assert serde_info._properties["parameters"] == parameters
assert serde_info.serialization_library == serialization_library
assert serde_info.name == name
assert serde_info.parameters == parameters

@pytest.mark.parametrize(
"serialization_library,name,parameters",
Expand Down

0 comments on commit 0ac51f7

Please sign in to comment.