Skip to content

Remove incorrect kwds from DateOffset tests #17486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pandas/tests/tseries/test_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def offset_types(self):

def _get_offset(self, klass, value=1, normalize=False):
# create instance from offset class
if klass is FY5253 or klass is FY5253Quarter:
if klass is FY5253:
klass = klass(n=value, startingMonth=1, weekday=1,
variation='last', normalize=normalize)
elif klass is FY5253Quarter:
klass = klass(n=value, startingMonth=1, weekday=1,
qtr_with_extra_week=1, variation='last',
normalize=normalize)
Expand Down Expand Up @@ -2629,7 +2632,7 @@ def test_offset(self):

def test_day_of_month(self):
dt = datetime(2007, 1, 1)
offset = MonthEnd(day=20)
offset = MonthEnd()

result = dt + offset
assert result == Timestamp(2007, 1, 31)
Expand Down Expand Up @@ -3678,7 +3681,7 @@ def test_onOffset(self):
1, startingMonth=8, weekday=WeekDay.THU,
qtr_with_extra_week=4)
offset_n = FY5253(weekday=WeekDay.TUE, startingMonth=12,
variation="nearest", qtr_with_extra_week=4)
variation="nearest")

tests = [
# From Wikipedia
Expand Down