-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Split test_offsets.py #30194
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
TST: Split test_offsets.py #30194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Raalsky for the PR. making changes and splitting files in the same PR make review more difficult. Is is possible to do just the split or just the fixturisation in this PR and then a follow-on?
|
||
|
||
@pytest.fixture(params=[getattr(offsets, o) for o in BUSINESS_OFFSETS]) | ||
def business_offset_types(request): | ||
""" | ||
Fixture for all the datetime offsets available for a time series. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same docstring for business_offset_types as date_offset_types docstring. should differentiate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in #31034
if issubclass(getattr(offsets, o), offsets.MonthOffset) and o != "MonthOffset" | ||
] | ||
) | ||
def month_classes(request): | ||
def business_month_classes(request): | ||
""" | ||
Fixture for month based datetime offsets available for a time series. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same docstring for business_month_classes as date_month_classes. should differentiate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in #31034
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah if you can do a straight move first, then we can fixturize (or the other way around is ok too). having multiple targeted PRs is likely to make review / merge much faster.
@Raalsky can you rebase |
closing as stale. @Raalsky would love a PR that first moves, then followups to split / parameterize this. make small targeted PRs; we can then merge quickly. |
Sorry for being off during the holidays. I've prepared the first step (move) test_offsets to test_date_offsets #31031 Will be following by adding fixtures and then business/date split. |
Fixtures added in #31034 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff