def test_window_fraction_is_fraction(self): window_fraction = 2 with pytest.raises(ValueError): find_outliers(np.zeros(5), window_fraction=window_fraction)
def test_data_can_be_1d(self): find_outliers(np.zeros(5))
def test_threshold_not_none(self): with pytest.raises(TypeError): find_outliers(np.zeros(5), None)
def test_threshold_not_inf(self): with pytest.raises(ValueError): find_outliers(np.zeros(5), np.inf)
def test_threshold_not_negative(self): with pytest.raises(ValueError): find_outliers(np.zeros(5), -1)
def test_cannot_send_empty(self): with pytest.raises(ValueError): find_outliers([]) with pytest.raises(ValueError): find_outliers(np.array([]))
def test_cannot_send_none(self): with pytest.raises(Exception): find_outliers(None)
def test_data_can_be_linear(self): find_outliers(np.linspace(0, 5, 100))
def test_window_fraction_is_fraction(self, window_fraction): if 0 <= window_fraction <= 1: return with pytest.raises(ValueError): find_outliers(np.zeros(5), window_fraction=window_fraction)