示例#1
0
def test_actual_results_show_options(params):
    """Test that the actual results are the expected ones."""
    res_actual = show_options(**params)
    if ('disp' in params.keys()) and (not params['disp']):
        assert isinstance(res_actual, str)
    else:
        assert res_actual is None
示例#2
0
def test_actual_results_show_options(params, res_desired):
    """Test that the actual results are the expected ones."""
    res_actual = show_options(disp=True, **params)
    np.testing.assert_equal(res_actual, res_desired)
示例#3
0
def test_parameter_check_show_options(params):
    """Test parameter validation."""
    err_msg = ("'method' must be either None, 'classic', 'sakoechiba', "
               "'itakura', 'region', 'multiscale' or 'fast'.")
    with pytest.raises(ValueError, match=re.escape(err_msg)):
        show_options(**params)
示例#4
0
def test_parameter_check_show_options(params, err_msg):
    """Test parameter validation."""
    with pytest.raises(ValueError, match=re.escape(err_msg)):
        show_options(**params)