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

Continue Collecting Arithmetic Tests #22267

Merged
merged 5 commits into from
Aug 10, 2018

Conversation

jbrockmendel
Copy link
Member

A small amount of cleanup/parametrization, but mostly moving tests ~unchanged.

A few tests in tests.frame.test_operators are moved to tests.frame.test_arithmetic.

In a bunch of cases I'm trying to not move things that will cause merge conflicts with #22163; will get those in an upcoming pass.

@pep8speaks
Copy link

pep8speaks commented Aug 9, 2018

Hello @jbrockmendel! Thanks for updating the PR.

Line 170:13: E722 do not use bare except'

Comment last updated on August 09, 2018 at 22:34 Hours UTC

@gfyoung gfyoung added Testing pandas testing functions or related to the test suite Clean labels Aug 9, 2018
@gfyoung gfyoung requested a review from jreback August 9, 2018 20:07
def test_mul_int(self, idx):
result = idx * 1
tm.assert_index_equal(result, idx)
@pytest.mark.parametrize('op', [operator.mul, ops.rmul, operator.floordiv])
Copy link
Contributor

Choose a reason for hiding this comment

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

future nit, might as well import the other operator to ops to make things consistent

else:
aliases = {'div': 'truediv'}

for op in ops:
Copy link
Contributor

Choose a reason for hiding this comment

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

woa needs parametrization big time :>

Copy link
Member Author

Choose a reason for hiding this comment

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

Very much so.

@@ -1,12 +1,17 @@
# -*- coding: utf-8 -*-
import operator
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't you moving things to pandas/tests/arithmetic ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The focus is on tests that can be shared across Index/Series/DataFrame(/EA). flex ops don't satisfy that criterion.

Copy link
Member Author

Choose a reason for hiding this comment

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

In case unclear, the tests added to tests.frame.test_arithmetic were moved from tests.frame.test_operators; so this is a strictly better location.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah its ok.

@jreback jreback added this to the 0.24.0 milestone Aug 9, 2018
@jreback
Copy link
Contributor

jreback commented Aug 9, 2018

looks fine. ping on green. (go ahead and merge)

@codecov
Copy link

codecov bot commented Aug 10, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22267   +/-   ##
=======================================
  Coverage   92.08%   92.08%           
=======================================
  Files         169      169           
  Lines       50704    50704           
=======================================
  Hits        46691    46691           
  Misses       4013     4013
Flag Coverage Δ
#multiple 90.49% <ø> (ø) ⬆️
#single 42.33% <ø> (ø) ⬆️

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 475e391...f18ba2e. Read the comment docs.

@jreback jreback merged commit 1543a75 into pandas-dev:master Aug 10, 2018
@jreback
Copy link
Contributor

jreback commented Aug 10, 2018

thanks

@jbrockmendel jbrockmendel deleted the arith_tests6 branch August 10, 2018 17:21
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants