-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
REF/TST: collect reduction tests #24367
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24367 +/- ##
===========================================
- Coverage 92.29% 42.98% -49.31%
===========================================
Files 162 162
Lines 51832 51832
===========================================
- Hits 47839 22281 -25558
- Misses 3993 29551 +25558
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24367 +/- ##
=======================================
Coverage 92.3% 92.3%
=======================================
Files 162 162
Lines 51875 51875
=======================================
Hits 47883 47883
Misses 3992 3992
Continue to review full report at Codecov.
|
Thoughts on using markers instead of (or in addition to) moving? |
The idea is to parametrize in order to make sure we test that behavior matches across the classes. I don't see how using a marker instead gets us closer to that. |
pandas/tests/test_reductions.py
Outdated
result == unit | ||
|
||
# skipna, explicit | ||
result = getattr(s, method)(skipna=True, min_count=0) |
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.
does it make sense to make this a subdir to start?
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.
I'm hopeful this won't be a big enough file to need to be split. Easier to split later than un-split.
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.
its already a pretty hefty file no?
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.
i guess. will split.
Hello @jbrockmendel! Thanks for updating the PR.
|
ok, would like to remove the classes and rather have separate files for each. can leave that for a separate pass. |
Similar to how to have tests.arithmetic for tests where we expect EA/Index/Series/DataFrame behavior to be analogous, this starts collecting the tests for reduction operations. This is motivated by #24293.
This does not yet collect tests from tests.frame.test_analytics or any of tests.arrays or tests.indexes.
Optionally we may want parts of test_nanops to be part of test_reductions, since those functions will also be in the check-these-are-equivalent pile.
Parametrizes some tests in test_base.
Moved tests are unchanged, except for non-context usages of
pytest.raises
are context-ified; some tests are parametrized.