Skip to content

Commit

Permalink
Fix failure in niriss tweakreg test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed May 16, 2024
1 parent 3df35ef commit 51b0abd
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions jwst/regtest/test_niriss_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from jwst import datamodels
from jwst.stpipe import Step
from jwst.tweakreg import TweakRegStep


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -54,15 +53,25 @@ def test_niriss_tweakreg_no_sources(rtdata, fitsdiff_default_kwargs):
rtdata.input = "niriss/imaging/jw01537-o003_20240406t164421_image3_00004_asn.json"
rtdata.get_asn("niriss/imaging/jw01537-o003_20240406t164421_image3_00004_asn.json")

args = ["jwst.tweakreg.TweakRegStep", rtdata.input, "--abs_refcat='GAIADR3'"]
args = [
"jwst.tweakreg.TweakRegStep",
rtdata.input,
"--abs_refcat='GAIADR3'",
"--save_results=True",
]
result = Step.from_cmdline(args)
# Check that the step is skipped
assert result.skip

# Check the status of the step is set correctly in the files.
result = TweakRegStep.call(rtdata.input)

for fi in result._models:
result = datamodels.ModelContainer(
rtdata.input,
return_open=False,
save_open=False
)

for fi in result:
fi = fi[:-5] + "_tweakreg" + fi[-5:]
with datamodels.open(fi) as model:
assert model.meta.cal_step.tweakreg == 'SKIPPED'

Expand Down

0 comments on commit 51b0abd

Please sign in to comment.