Skip to content

Commit

Permalink
TST: Suppress Pydantic serializer warning
Browse files Browse the repository at this point in the history
This test issues serialization warnings because we are serializing
`InternalUnsetData` through `AnyData` which does does not expect to do
so. It is a valid warning, but will persist until creating
`content="unset"` metadata is fully removed.
  • Loading branch information
mferrera committed Sep 27, 2024
1 parent 633e1dd commit 4e7972b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_units/test_dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def test_unit_is_none(globalconfig1, regsurf):
assert meta["data"]["unit"] == ""


@pytest.mark.filterwarnings("ignore:Pydantic serializer warnings")
def test_content_not_given(globalconfig1, regsurf):
"""When content is not explicitly given, warning shall be issued."""
eobj = ExportData(config=globalconfig1)
Expand Down

0 comments on commit 4e7972b

Please sign in to comment.