Skip to content

Commit

Permalink
Fix failure in niriss tweakreg test (#8489)
Browse files Browse the repository at this point in the history
Co-authored-by: Howard Bushouse <bushouse@stsci.edu>
  • Loading branch information
mcara and hbushouse committed May 18, 2024
1 parent 70bed1d commit 6fe0ef3
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 @@ -54,17 +54,26 @@ 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)
mc = datamodels.ModelContainer(rtdata.input)

for fi in result._models:
with datamodels.open(fi) as model:
assert model.meta.cal_step.tweakreg == 'SKIPPED'
for model in mc:
assert model.meta.cal_step.tweakreg != 'SKIPPED'

result = TweakRegStep.call(mc)

for model in result:
assert model.meta.cal_step.tweakreg == 'SKIPPED'

result.close()

Expand Down

0 comments on commit 6fe0ef3

Please sign in to comment.