Ejemplo n.º 1
0
def test_psf_set_model_to_bool(kernel_func):
    """Can we change the model field? boolean

    This is a regression test.
    """

    m = PSFModel(kernel=kernel_func())
    # This does not error out
    m.model = False
Ejemplo n.º 2
0
def test_psf_set_model_to_model(kernel_func):
    """Can we change the model field? model

    This is a regression test.
    """

    m = PSFModel(kernel=kernel_func())
    with pytest.raises(AttributeError) as err:
        m.model = Box1D()

    assert str(
        err.value
    ) == "'PSFModel' object attribute 'model' cannot be replaced with a callable attribute"