diff options
author | H. Vetinari <h.vetinari@gmx.com> | 2021-11-02 14:18:52 +1100 |
---|---|---|
committer | H. Vetinari <h.vetinari@gmx.com> | 2021-11-02 14:18:52 +1100 |
commit | 01443e8d32dd586ac27fe5aebe1a781460190e6a (patch) | |
tree | 3862844c8346add0db2b8e4af5d22c76a19d53ee | |
parent | fae6fa47a3cf9b9c64af2f5bd11a3b644b1763d2 (diff) | |
download | numpy-01443e8d32dd586ac27fe5aebe1a781460190e6a.tar.gz |
TST: turn glibc_older_than_2.17 into boolean instead of xfail
this anticipates reuse of this boolean within the test module
-rw-r--r-- | numpy/core/tests/test_umath.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py index 8f5a85824..2f7322412 100644 --- a/numpy/core/tests/test_umath.py +++ b/numpy/core/tests/test_umath.py @@ -28,9 +28,7 @@ def get_glibc_version(): glibcver = get_glibc_version() -glibc_newerthan_2_17 = pytest.mark.xfail( - glibcver != '0.0' and glibcver < '2.17', - reason="Older glibc versions may not raise appropriate FP exceptions") +glibc_older_than_2_17 = (glibcver != '0.0' and glibcver < '2.17') def on_powerpc(): """ True if we are running on a Power PC platform.""" @@ -1024,7 +1022,10 @@ class TestSpecialFloats: # Older version of glibc may not raise the correct FP exceptions # See: https://github.com/numpy/numpy/issues/19192 - @glibc_newerthan_2_17 + @pytest.mark.xfail( + glibc_older_than_2_17, + reason="Older glibc versions may not raise appropriate FP exceptions" + ) def test_exp_exceptions(self): with np.errstate(over='raise'): assert_raises(FloatingPointError, np.exp, np.float32(100.)) |