diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-01-19 14:10:10 -0600 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-01-19 14:14:27 -0600 |
commit | 5d98d672a85421ecdc2d20c7f0a74003eaff004d (patch) | |
tree | 7a11baa2533d67cf97df598a19d68e4f158ae6fb /numpy/lib/tests/test_io.py | |
parent | 9f9d755c9ab68a9ef3a5ffee8ea30d6a837732c1 (diff) | |
download | numpy-5d98d672a85421ecdc2d20c7f0a74003eaff004d.tar.gz |
TST: Skip unparsable field error tests on PyPy
PyPy has a small bug with error formatting, so these cause it to
crash. Simply skip the tests on old PyPy versions for now.
(Matti fixed the issue long ago, just waiting for a new PyPy release :))
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r-- | numpy/lib/tests/test_io.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 37404cb41..a2758123b 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -779,6 +779,8 @@ class TestLoadTxt(LoadTxtBase): a = np.array([[1, 2, 3], [4, 5, 6]], int) assert_array_equal(x, a) + @pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8), + reason="PyPy bug in error formatting") def test_comments_multi_chars(self): c = TextIO() c.write('/* comment\n1,2,3,5\n') @@ -995,6 +997,8 @@ class TestLoadTxt(LoadTxtBase): c, dtype=dt, converters=float.fromhex, encoding="latin1") assert_equal(res, tgt, err_msg="%s" % dt) + @pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8), + reason="PyPy bug in error formatting") def test_default_float_converter_no_default_hex_conversion(self): """ Ensure that fromhex is only used for values with the correct prefix and @@ -1005,6 +1009,8 @@ class TestLoadTxt(LoadTxtBase): match=".*convert string 'a' to float64 at row 0, column 1"): np.loadtxt(c) + @pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8), + reason="PyPy bug in error formatting") def test_default_float_converter_exception(self): """ Ensure that the exception message raised during failed floating point |