Skip to content

TST: Split test_offsets.py #27085

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

Closed
mroeschke opened this issue Jun 27, 2019 · 9 comments
Closed

TST: Split test_offsets.py #27085

mroeschke opened this issue Jun 27, 2019 · 9 comments
Assignees
Labels
Frequency DateOffsets good first issue Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite

Comments

@mroeschke
Copy link
Member

xref #26628 (comment)

It would be good to create:

pandas/tests/tseries/offsets/test_business_offsets.py for business offsets
pandas/tests/tseries/offsets/test_date_offsets.py for all offsets that subclass DateOffset

and converting the tests to pytest idioms.

@mroeschke mroeschke added Frequency DateOffsets good first issue Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite labels Jun 27, 2019
@mroeschke mroeschke added this to the Contributions Welcome milestone Jun 27, 2019
@dhirensr
Copy link

@mroeschke : is it seperating the tests which use DateOffset into a new created file test_date_offsets.py?

@mroeschke
Copy link
Member Author

Yes

@Hiyorimi
Copy link

Hiyorimi commented Oct 5, 2019

Can I work on this one ?)

@Raalsky
Copy link

Raalsky commented Nov 9, 2019

Is anyone in active development about these issue? Could I spend awhile upon it? @Hiyorimi

@Raalsky
Copy link

Raalsky commented Nov 11, 2019

Does anyone was thinking about the way we can split fixtures for test_offsets? ->

def offset_types(request):

I mean it's necessary in case we iterate over the list of classes from tseries.offsets.__all__. Is it ok if we have logic about filtering Business/Non-Business classes within two different fixtures? Or we want to separate them in pandas.tseries.offsets in some way?

@jreback
Copy link
Contributor

jreback commented Nov 11, 2019

there are already some fixtures defined look in pandas/contest.py and see how they r used

@felixDulys
Copy link
Contributor

take

@felixDulys
Copy link
Contributor

It's been a minute since this issue was worked on! Taking a look--

It would be good to create:

pandas/tests/tseries/offsets/test_business_offsets.py for business offsets

Comparing what we have in master now with what tests looked like with the xref comment timeframe, there are some improvements. We have a few new business offset files (ex. test_business_day.py and test_business_hour.py), but there still seems to be a healthy chunk of work. The file test_offsets.py still has a few business functions in there (even if in name only)...

pandas/tests/tseries/offsets/test_date_offsets.py for all offsets that subclass DateOffset

...this is still seemingly available...

and converting the tests to pytest idioms.

...and I think there is some good to do here as well, still.

This could be a lot for one PR, so I will try and break off pieces of this in a meaningful way.

felixDulys added a commit to felixDulys/pandas that referenced this issue Jun 28, 2021
felixDulys added a commit to felixDulys/pandas that referenced this issue Jul 16, 2021
felixDulys added a commit to felixDulys/pandas that referenced this issue Aug 5, 2021
felixDulys added a commit to felixDulys/pandas that referenced this issue Aug 5, 2021
felixDulys added a commit to felixDulys/pandas that referenced this issue Aug 11, 2021
felixDulys added a commit to felixDulys/pandas that referenced this issue Aug 11, 2021
@mroeschke
Copy link
Member Author

This looks sufficiently completed so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frequency DateOffsets good first issue Refactor Internal refactoring of code Testing pandas testing functions or related to the test suite
Projects
None yet
6 participants