Exemplo n.º 1
0
def test_crds_override():
    step = AnotherDummyStep(
        "SomeOtherStepOriginal",
        par1=42.0, par2="abc def",
        override_flat_field=join(dirname(__file__), 'data', 'flat.fits'))

    fd = step.get_reference_file(datamodels.open(), 'flat_field')
    assert fd == join(dirname(__file__), 'data', 'flat.fits')
Exemplo n.º 2
0
def test_step_from_python():
    step = AnotherDummyStep("SomeOtherStepOriginal", par1=42.0, par2="abc def")

    assert step.par1 == 42.0
    assert step.par2 == 'abc def'
    assert step.par3 is False

    result = step.run(1, 2)

    assert result == 3
Exemplo n.º 3
0
def test_extra_parameter():
    with pytest.raises(ValidationError):
        AnotherDummyStep("SomeOtherStepOriginal", par5='foo')
Exemplo n.º 4
0
def test_step_from_python_simple2():
    step_fn = join(dirname(__file__), 'steps', 'some_other_step.cfg')

    result = AnotherDummyStep.call(1, 2, config_file=step_fn)

    assert result == 3
Exemplo n.º 5
0
def test_step_from_python_simple():
    result = AnotherDummyStep.call(1, 2, par1=42.0, par2="abc def")

    assert result == 3