Skip to content

Commit 01443e8

Browse files
committed
TST: turn glibc_older_than_2.17 into boolean instead of xfail
this anticipates reuse of this boolean within the test module
1 parent fae6fa4 commit 01443e8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

numpy/core/tests/test_umath.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def get_glibc_version():
2828

2929

3030
glibcver = get_glibc_version()
31-
glibc_newerthan_2_17 = pytest.mark.xfail(
32-
glibcver != '0.0' and glibcver < '2.17',
33-
reason="Older glibc versions may not raise appropriate FP exceptions")
31+
glibc_older_than_2_17 = (glibcver != '0.0' and glibcver < '2.17')
3432

3533
def on_powerpc():
3634
""" True if we are running on a Power PC platform."""
@@ -1024,7 +1022,10 @@ def test_exp_values(self):
10241022

10251023
# Older version of glibc may not raise the correct FP exceptions
10261024
# See: https://github.com/numpy/numpy/issues/19192
1027-
@glibc_newerthan_2_17
1025+
@pytest.mark.xfail(
1026+
glibc_older_than_2_17,
1027+
reason="Older glibc versions may not raise appropriate FP exceptions"
1028+
)
10281029
def test_exp_exceptions(self):
10291030
with np.errstate(over='raise'):
10301031
assert_raises(FloatingPointError, np.exp, np.float32(100.))

0 commit comments

Comments
 (0)