Exemple #1
0
def test_get_ts_raises():
    name = 'not a valid ts'
    with pytest.raises(ValueError) as excinfo:
        get_ts(name)

    expected_msg = ('Invalid test statisitc, {}, entered. Must be '
                    'in {}'.format(name, TEST_STATISTICS.keys()))
    assert expected_msg == str(excinfo.value)
Exemple #2
0
def test_ts_calc(ts, example_dataset):
    # Regression test for issue #92
    ts_obj = get_ts(ts)
    ts_func = ts_obj(tol=0.01,
                     num_causes=len(example_dataset.data),
                     TestRange=[0, 1e2],
                     verbose=False)
    ts_func.calc(example_dataset.data, example_dataset.data + 1)
Exemple #3
0
def test_get_ts(name):
    assert name in TEST_STATISTICS.keys()
    assert get_ts(name) in TEST_STATISTICS.values()