Skip to content
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

Merged
merged 9 commits into from
Dec 23, 2018
Merged

REF/TST: collect reduction tests #24367

merged 9 commits into from
Dec 23, 2018

Conversation

jbrockmendel
Copy link
Member

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.

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #24367 into master will decrease coverage by 49.3%.
The diff coverage is n/a.

Impacted file tree graph

@@             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
Flag Coverage Δ
#multiple ?
#single 42.98% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/core/categorical.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-98.65%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-95.46%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.17%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.15%) ⬇️
pandas/core/tools/numeric.py 10.44% <0%> (-89.56%) ⬇️
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6cf7d9...6c98821. Read the comment docs.

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #24367 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24367   +/-   ##
=======================================
  Coverage    92.3%    92.3%           
=======================================
  Files         162      162           
  Lines       51875    51875           
=======================================
  Hits        47883    47883           
  Misses       3992     3992
Flag Coverage Δ
#multiple 90.71% <ø> (ø) ⬆️
#single 42.99% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c58817...e3a6fc6. Read the comment docs.

@TomAugspurger
Copy link
Contributor

Thoughts on using markers instead of (or in addition to) moving?

@jbrockmendel
Copy link
Member Author

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.

result == unit

# skipna, explicit
result = getattr(s, method)(skipna=True, min_count=0)
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess. will split.

@jreback jreback added Testing pandas testing functions or related to the test suite Numeric Operations Arithmetic, Comparison, and Logical operations labels Dec 21, 2018
@pep8speaks
Copy link

Hello @jbrockmendel! Thanks for updating the PR.

@jreback jreback added this to the 0.24.0 milestone Dec 23, 2018
@jreback
Copy link
Contributor

jreback commented Dec 23, 2018

ok, would like to remove the classes and rather have separate files for each. can leave that for a separate pass.

@jreback jreback merged commit 2d3e103 into pandas-dev:master Dec 23, 2018
@jbrockmendel jbrockmendel deleted the tred branch December 23, 2018 16:40
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants