Skip to content

Commit de2df52

Browse files
committed
TST add regression test for GH2753
1 parent 378adfb commit de2df52

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

RELEASE.rst

+1
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ pandas 0.11.0
291291
.. _GH2781: https://github.com/pydata/pandas/issues/2781
292292
.. _GH2787: https://github.com/pydata/pandas/issues/2787
293293
.. _GH2437: https://github.com/pydata/pandas/issues/2437
294+
.. _GH2753: https://github.com/pydata/pandas/issues/2753
294295
.. _GH2793: https://github.com/pydata/pandas/issues/2793
295296
.. _GH2795: https://github.com/pydata/pandas/issues/2795
296297
.. _GH2797: https://github.com/pydata/pandas/issues/2797

pandas/tseries/tests/test_resample.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import numpy as np
66

7-
from pandas import Series, TimeSeries, DataFrame, Panel, isnull, notnull
7+
from pandas import Series, TimeSeries, DataFrame, Panel, isnull, notnull, Timestamp
88

99
from pandas.tseries.index import date_range
1010
from pandas.tseries.offsets import Minute, BDay
@@ -934,6 +934,14 @@ def test_resample_weekly_bug_1726(self):
934934
# it works!
935935
df.resample('W-MON', how='first', closed='left', label='left')
936936

937+
def test_resample_bms_2752(self):
938+
# GH2753
939+
foo = pd.Series(index=pd.bdate_range('20000101','20000201'))
940+
res1 = foo.resample("BMS")
941+
res2 = foo.resample("BMS").resample("B")
942+
self.assertEqual(res1.index[0], Timestamp('20000103'))
943+
self.assertEqual(res1.index[0], res2.index[0])
944+
937945
# def test_monthly_convention_span(self):
938946
# rng = period_range('2000-01', periods=3, freq='M')
939947
# ts = Series(np.arange(3), index=rng)

0 commit comments

Comments
 (0)