From 4ecb40c57aaf1ae99fd6d8d9be66b7530277cf40 Mon Sep 17 00:00:00 2001 From: Brett Graham Date: Thu, 8 Aug 2024 10:56:36 -0400 Subject: [PATCH] update test to allow easier deprecation of `ignore_version_mismatch` (#8693) --- jwst/assign_wcs/tests/test_schemas.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jwst/assign_wcs/tests/test_schemas.py b/jwst/assign_wcs/tests/test_schemas.py index 7a91bfd22a..8d9e2bd522 100644 --- a/jwst/assign_wcs/tests/test_schemas.py +++ b/jwst/assign_wcs/tests/test_schemas.py @@ -2,6 +2,7 @@ import sys import warnings +from asdf.exceptions import AsdfDeprecationWarning from astropy.modeling import models from astropy import units as u import pytest @@ -55,6 +56,14 @@ def test_distortion_schema(distortion_model, tmp_path): with warnings.catch_warnings(): warnings.simplefilter("error") + # filter out the ignore_version_mismatch deprecation as it's + # unrelated to this test and will make the deprecation easier + # see https://github.com/spacetelescope/stdatamodels/pull/313 + warnings.filterwarnings( + "ignore", + message="ignore_version_mismatch is deprecated and has done nothing since asdf 3.0.0", + category=AsdfDeprecationWarning, + ) with DistortionModel(path) as dist1: assert dist1.meta.instrument.p_pupil == dist.meta.instrument.p_pupil assert dist1.meta.instrument.pupil == dist.meta.instrument.pupil