Skip to content

Commit

Permalink
TST: Test CustomBusinessHour resampling (pandas-dev#12351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Younggun Kim committed Aug 18, 2020
1 parent 7efaba9 commit 7fd3c48
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pandas/tests/resample/test_resample_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,20 @@ def test_resample_agg_readonly():

result = rs.agg("min")
tm.assert_series_equal(result, expected)


def test_resample_business_hourly(self):
rng = pd.date_range(start='2020-05-18 00:00:00',
end='2020-05-19 23:00:00',
freq='H')
expected_rng = pd.date_range(start='2020-05-18 00:00:00',
end='2017-05-19 23:00:00',
freq='BH')

ts = Series(1, index=rng)
result = ts.asfreq('BH')
expected_ts = Series(1, index=expected_rng)

assert_series_equal(result, expected_ts)


0 comments on commit 7fd3c48

Please sign in to comment.