Skip to content

Commit 5e5e0c0

Browse files
committed
exclude base classes from testing
1 parent d5443ca commit 5e5e0c0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pandas/tests/tseries/test_offsets.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@
4444

4545
offset_classes = [getattr(offsets, x) for x in dir(offsets)]
4646
offset_classes = [x for x in offset_classes if inspect.isclass(x) and
47-
issubclass(x, DateOffset)]
47+
issubclass(x, DateOffset) and
48+
x not in [offsets.YearOffset, offsets.Tick,
49+
offsets.SingleConstructorOffset,
50+
offsets.SemiMonthOffset,
51+
offsets.QuarterOffset, offsets.MonthOffset]]
4852

4953

5054
@pytest.fixture(params=offset_classes)

pandas/tseries/offsets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,8 @@ def __init__(self, n=1, normalize=False, startingMonth=None):
16861686
self.startingMonth = startingMonth
16871687

16881688
self.kwds = {'startingMonth': startingMonth}
1689+
self._offset = timedelta(1)
1690+
self._use_relativedelta = False
16891691

16901692
def isAnchored(self):
16911693
return (self.n == 1 and self.startingMonth is not None)

0 commit comments

Comments
 (0)