Ejemplo n.º 1
0
def test_makeliststep_call_config_file():
    """Test override step asdf with .cfg"""
    config_file = t_path(
        Path('steps') / 'makelist.cfg'
    )
    results = MakeListStep.call(config_file=config_file)
    assert results == [43.0, 'My hovercraft is full of eels.', False]
Ejemplo n.º 2
0
def test_step_from_asdf_api_override():
    """Test initializing step completely from config"""
    config_file = t_path(
        Path('steps') / 'jwst_generic_pars-makeliststep_0001.asdf'
    )
    results = MakeListStep.call(config_file=config_file, par1=0.)
    assert results == [0., DEFAULT_PAR2, False]
Ejemplo n.º 3
0
def test_asdf_from_call():
    """Test using an ASDF file from call"""
    config_file = t_path(
        Path('steps') / 'jwst_generic_pars-makeliststep_0001.asdf'
    )
    results = MakeListStep.call(config_file=config_file)

    assert results == DEFAULT_RESULT
Ejemplo n.º 4
0
def test_makeliststep_test():
    """Test the testing step class for basic operation"""
    result = MakeListStep.call(par1=DEFAULT_PAR1, par2=DEFAULT_PAR2)

    assert result == DEFAULT_RESULT
Ejemplo n.º 5
0
def test_makeliststep_missingpars():
    """Test the testing step class when given insufficient information"""
    with pytest.raises(ValidationError):
        MakeListStep.call()