示例#1
0
def test_string_override():
    dm_ramp, ref_data = create_models()

    step = DQInitStep(override_mask="some_file.fits")

    # Verify stpipe treats string as filename and attempts to open
    with pytest.raises(FileNotFoundError):
        step.get_reference_file(dm_ramp, 'mask')
示例#2
0
def test_valid_model_override():
    dm_ramp, ref_data = create_models()

    step = DQInitStep(override_mask=ref_data)

    # Verify get_reference_file() returns an override model.
    fetched_reference = step.get_reference_file(dm_ramp, 'mask')
    assert isinstance(fetched_reference, MaskModel), \
        "get_reference_file() should return a model for this override."

    # Verify no exceptions occur during DQ processing.
    step.process(dm_ramp)