From ced39e840e49cb305f657239e3ce166f71cc66a2 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 7 Aug 2024 11:46:17 -0400 Subject: [PATCH] add test for ignore_version_mismatch deprecation --- asdf/_tests/test_deprecated.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asdf/_tests/test_deprecated.py b/asdf/_tests/test_deprecated.py index 810a8d4c9..2a13151c3 100644 --- a/asdf/_tests/test_deprecated.py +++ b/asdf/_tests/test_deprecated.py @@ -146,3 +146,9 @@ def test_AsdfFile_ignore_implicit_conversion_deprecation(value): def test_walk_and_modify_ignore_implicit_conversion_deprecation(value): with pytest.warns(AsdfDeprecationWarning, match="ignore_implicit_conversion is deprecated"): asdf.treeutil.walk_and_modify({}, lambda obj: obj, ignore_implicit_conversion=value) + + +@pytest.mark.parametrize("value", [True, False]) +def test_ignore_version_mismatch_deprecation(value): + with pytest.warns(AsdfDeprecationWarning, match="ignore_version_mismatch is deprecated"): + asdf.AsdfFile({}, ignore_version_mismatch=value)