Skip to content

Commit

Permalink
update test for new pytest.warns behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Feb 27, 2024
1 parent 564f1e6 commit d9bd0c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion asdf/_tests/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def test_implicit_conversion_warning():

tree = {"val": nt(1, 2, np.ones(3))}

with pytest.warns(AsdfWarning, match=r"Failed to serialize instance"), asdf.AsdfFile(tree):
with (
pytest.warns(AsdfWarning, match=r"Failed to serialize instance"),
pytest.warns(AsdfDeprecationWarning, match=r"implicit conversion is deprecated"),
asdf.AsdfFile(tree),
):
pass

with multi_warn(AsdfDeprecationWarning, ["ignore_implicit_conversion", "implicit conversion is deprecated"]):
Expand Down

0 comments on commit d9bd0c8

Please sign in to comment.