Esempio n. 1
0
def test_find_non_nan_reversed():
    """
    Test discerner.analyze.find_non_nan for case of reversed data
    """
    data = [1, 2, 3, NARealType(), 5, 6]
    index = find_non_nan(data, 3, reverse=True)
    eq_(data[index], 3)
Esempio n. 2
0
def test_find_non_nan():
    """
    Test discerner.analyze.find_non_nan for the case of non reversed values
    """
    data = [1, 2, 3, NARealType(), 5, 6]
    index = find_non_nan(data, 3)
    eq_(data[index], 5)
Esempio n. 3
0
def test_find_non_nan_error_raised():
    """
    Test discerner.analyze.find_non_nan for case where an error is raised
    """
    data = [1, 2, 3, NARealType()]
    find_non_nan(data, 3)