Skip to content

Commit

Permalink
adjust format
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKehan authored and YangKehan committed Nov 7, 2023
1 parent a22a8b6 commit a354ad5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def outlier_storms(self, series, data):
yield OutlierEvents(series)

@pytest.mark.parametrize('data, outliers', [
([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 23, 4, 42, 2, 2, -40], [42, -40])
([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 3, 3, 3, 3, 23, 4, 42, 2, 2, -40], [42, -40])
])
def test_outliers(self, outlier_storms, data, outliers):
outlier_storms.find()
Expand All @@ -107,7 +108,9 @@ def test_outliers(self, outlier_storms, data, outliers):
[3.34, 2.55, 2.43, 1.54, 1.14])
])
def test_outliers_from_station(self, station_id, start, stop, source, outliers):
outlier_storms = OutlierEvents.from_station(station_id=station_id, start=start, stop=stop, source=source)
outlier_storms = OutlierEvents.from_station(station_id=station_id,
start=start, stop=stop, source=source)
outlier_storms.find()
tolerance = 1e-10
assert outlier_storms.outliers.values.tolist() == pytest.approx(outliers, rel=tolerance, abs=tolerance)
assert (outlier_storms.outliers.values.tolist() ==
pytest.approx(outliers, rel=tolerance, abs=tolerance))

1 comment on commit a354ad5

@KehanGit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format code

Please sign in to comment.