Skip to content

Commit

Permalink
update test to allow easier deprecation of ignore_version_mismatch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Aug 8, 2024
1 parent 89f126a commit 4ecb40c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jwst/assign_wcs/tests/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4ecb40c

Please sign in to comment.