Skip to content

Commit

Permalink
Fix bug in test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MDUYN committed Dec 16, 2024
1 parent a7c50fd commit 509923c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/indicators/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_has_any_higher_then_threshold(self):
self.assertFalse(has_any_higher_then_threshold(df, column="RSI", threshold=80, number_of_data_points=10, strict=False))
self.assertTrue(has_any_higher_then_threshold(df, column="RSI", threshold=70, number_of_data_points=10, strict=True))
self.assertFalse(has_any_higher_then_threshold(df, column="RSI", threshold=80, number_of_data_points=10, strict=True))

df = pd.DataFrame({
"RSI": [70, 71, 100, 73, 20, 75, 15, 77, 78, 79],
"DateTime": pd.date_range("2021-01-01", periods=10, freq="D")
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_has_slope_above_threshold(self):
})
self.assertTrue(
has_slope_above_threshold(
df, column="RSI", threshold=-0.3, number_of_data_points=5, window_size=5
df, column="RSI", threshold=-0.4, number_of_data_points=5, window_size=5
)
)
self.assertTrue(
Expand Down

0 comments on commit 509923c

Please sign in to comment.