def test_detect_outlier_univariate_local():
    """Test that"""

    # test input with no outliers at all
    V = np.random.randn(200)
    X = np.random.randint(100, size=200)
    X = X[np.abs(V) < 1.5]
    V = V[np.abs(V) < 1.5]
    outliers = cleansing.detect_outliers(V, 4, coord=X, k=50)
    assert outliers.sum() == 0

    # test a postive outlier
    V[-1] = 10
    outliers = cleansing.detect_outliers(V, 4, coord=X, k=50)
    assert outliers.sum() == 1

    # test a negative outlier
    V[-1] = -10
    outliers = cleansing.detect_outliers(V, 4, coord=X, k=50)
    assert outliers.sum() == 1
Test that
pysteps/tests/test_utils_cleansing.py