Skip to content

Commit

Permalink
Coping with frequency changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjohnson150 committed Jun 18, 2024
1 parent d452ad1 commit 0a17f53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_csas.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ def test_get_hourly_data(self, station, station_id, variable, start, end,
df = station.get_hourly_data(start, end, [variable])

# Assert it's a daily timeseries
assert df.index.get_level_values('datetime').inferred_freq == 'h'
assert df.index.get_level_values('datetime').inferred_freq.lower() == 'h'
assert df[variable.name].mean() == pytest.approx(expected_mean, abs=1e-5)
2 changes: 1 addition & 1 deletion tests/test_snowex.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_get_hourly_data(self, station, station_id, variable, expected_mean):
[variable])

# Assert it's hourly timeseries
assert df.index.get_level_values('datetime').inferred_freq == 'h'
assert df.index.get_level_values('datetime').inferred_freq.lower() == 'h'
assert df[variable.name].mean() == pytest.approx(expected_mean, abs=1e-5)

@pytest.mark.parametrize("station_id, variable, start", [
Expand Down

0 comments on commit 0a17f53

Please sign in to comment.