diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-09-07 17:55:41 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-09-07 17:55:41 -0500 |
commit | 268e8e8853d4c17a0f95ca831630647c0b88557d (patch) | |
tree | a3e63cc8c70dc3b72fec2fc0c15d0e1b959e0cb6 /numpy | |
parent | 1fe57b2427e20f466c254ed6a98a014d9a9e574e (diff) | |
download | numpy-268e8e8853d4c17a0f95ca831630647c0b88557d.tar.gz |
TST: Make nanfunc test ignore overflow instead of xfailing test
This makes the test more precise, and I ran into having to broaden
the xfails otherwise, because right now reduce-likes incorrectly
faile to give floating point warnings (and I was fixing that).
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/lib/tests/test_nanfunctions.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_nanfunctions.py b/numpy/lib/tests/test_nanfunctions.py index 006b81a78..7756f2d79 100644 --- a/numpy/lib/tests/test_nanfunctions.py +++ b/numpy/lib/tests/test_nanfunctions.py @@ -257,10 +257,8 @@ class TestNanFunctions_NumberTypes: nanfunc_ids = [i.__name__ for i in nanfuncs] @pytest.mark.parametrize("nanfunc,func", nanfuncs.items(), ids=nanfunc_ids) + @np.errstate(over="ignore") def test_nanfunc(self, dtype, nanfunc, func): - if nanfunc is np.nanprod and dtype == "e": - pytest.xfail(reason="overflow encountered in reduce") - mat = self.mat.astype(dtype) tgt = func(mat) out = nanfunc(mat) |