-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: add test for numpy ops, esp. nanmin/max bug for np<1.13 #19753
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
Conversation
359f1ec
to
be0b2a4
Compare
pandas/tests/test_nanops.py
Outdated
@@ -15,6 +16,7 @@ | |||
import pandas.util._test_decorators as td | |||
|
|||
use_bn = nanops._USE_BOTTLENECK | |||
np_version113 = LooseVersion(np.__version__) >= LooseVersion('1.13') |
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.
import from pandas
we already define this
pandas/tests/test_nanops.py
Outdated
(np.nanmax, False, 4), | ||
]) | ||
def test_numpy_ops(numpy_op, passes_all_numpy_version, expected): | ||
# GH8383 |
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.
you can just make 2 tests
1 for numpy >= 1.13 and 1 for < 1.13 which assert those functions which exist there
be0b2a4
to
07b2995
Compare
Comments addressed. Not sure if I understood your second, but please look at changed test functions. |
lgtm ping on green |
Codecov Report
@@ Coverage Diff @@
## master #19753 +/- ##
==========================================
- Coverage 91.6% 91.6% -0.01%
==========================================
Files 150 150
Lines 48864 48864
==========================================
- Hits 44763 44761 -2
- Misses 4101 4103 +2
Continue to review full report at Codecov.
|
all green. |
thanks @topper-123 |
git diff upstream/master -u -- "*.py" | flake8 --diff
The bug in #8383 concerns np.nanmin and np.nanmax only, don't know if I'm testing too much.