예제 #1
0
def test_delta_T():
    with pytest.raises(TypeError, match=" in params_metric is of type"):
        validate_metric_params('bottleneck',
                               metric_params={
                                   'n_bins': 200,
                                   'delta': 'a'
                               })
예제 #2
0
def test_n_values_V():
    with pytest.raises(ValueError, match=" in param_metric should be between"):
        validate_metric_params('landscape',
                               metric_params={
                                   'n_bins': -2,
                                   'delta': 0.01
                               })
예제 #3
0
def test_delta_V():
    with pytest.raises(ValueError, match=" in param_metric should be between"):
        validate_metric_params('bottleneck',
                               metric_params={
                                   'n_bins': 200,
                                   'delta': -1
                               })
예제 #4
0
def test_n_values_T():
    with pytest.raises(TypeError, match=" in params_metric is of type "):
        validate_metric_params('landscape',
                               metric_params={
                                   'n_bins': 'a',
                                   'delta': 0.01
                               })
예제 #5
0
def test_metric_V():
    with pytest.raises(ValueError, match="No metric called"):
        validate_metric_params('blah',
                               metric_params={
                                   'n_bins': 200,
                                   'delta': 0.01
                               })
예제 #6
0
def test_sigma_T():
    with pytest.raises(TypeError, match=" in params_metric is of type"):
        validate_metric_params('heat',
                               metric_params={
                                   'n_bins': 200,
                                   'sigma': 'a'
                               })
예제 #7
0
def test_sigma_V():
    with pytest.raises(ValueError, match=" in param_metric should be between"):
        validate_metric_params('heat',
                               metric_params={
                                   'n_bins': 200,
                                   'sigma': -1
                               })
예제 #8
0
def test_validate():
    with pytest.raises(ValueError):
        validate_metric_params('heat', metric_params={'blah': 200})