예제 #1
0
def test_constant():
    data = [1, 1, 1, 1, 1]
    is_bad = _is_bad_data(data, 100)
    assert is_bad
예제 #2
0
def test_valid():
    data = [1, 0, 0, 2, 1]
    is_bad = _is_bad_data(data, 100)
    assert not is_bad
예제 #3
0
def test_sudden_jump():
    data = [0, 0, 0, 1000, 0]
    is_bad = _is_bad_data(data, 100)
    assert is_bad
예제 #4
0
def test_nan():
    data = [np.nan, 0, 0, 2, np.nan]
    is_bad = _is_bad_data(data, 100)
    assert is_bad