diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-07-12 15:40:33 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-07-12 15:40:33 -0500 |
commit | e502de26b8c84802e224e0bad66f9d179b51eab9 (patch) | |
tree | 06c90ff7c8a81cfac32b9e5438473972fdf923a5 | |
parent | e67c9c9f2897312344e98a3d76754d543eaaebde (diff) | |
download | numpy-e502de26b8c84802e224e0bad66f9d179b51eab9.tar.gz |
TST: Ignore floating point warning tests on MacOS
It is very much possible that this will also fail on other systems
and should rather only run, e.g. on newer glibc versions.
In principle, we could also split this into "no warnings given"
and "warning given". MacOS seems very sloppy with floating point
warnings, but hopefully it at least does not give spurious ones.
-rw-r--r-- | numpy/core/tests/test_umath.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index de4784051..ebd61d199 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -563,6 +563,9 @@ class TestRemainder: else: assert_(b > rem >= 0, msg) + @pytest.mark.xfail(sys.platform.startswith("darwin"), + reason="MacOS seems to not give the correct 'invalid' warning for " + "`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) def test_float_divmod_errors(self, dtype): # Check valid errors raised for divmod and remainder @@ -586,6 +589,9 @@ class TestRemainder: # inf / 0 does not set any flags, only the modulo creates a NaN np.divmod(finf, fzero) + @pytest.mark.xfail(sys.platform.startswith("darwin"), + reason="MacOS seems to not give the correct 'invalid' warning for " + "`fmod`. Hopefully, others always do.") @pytest.mark.parametrize('dtype', np.typecodes['Float']) @pytest.mark.parametrize('fn', [np.fmod, np.remainder]) def test_float_remainder_errors(self, dtype, fn): |