Skip to content

Commit 4f6fbe6

Browse files
committed
More segfaults?
1 parent bc9412c commit 4f6fbe6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

quaddtype/tests/test_quaddtype.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@ def test_supported_astype(dtype):
6565

6666
@pytest.mark.parametrize("dtype", ["S10", "U10", "T", "V10", "datetime64[ms]", "timedelta64[ms]"])
6767
def test_unsupported_astype(dtype):
68-
val = 1 if dtype != "V10" else b"1"
69-
70-
with pytest.raises(TypeError if dtype != "V10" else ValueError, match="cast"):
71-
np.array(val, dtype=dtype).astype(QuadPrecDType, casting="unsafe")
72-
7368
if dtype == "V10":
74-
pytest.xfail("cast from QuadPrecision to V10 segfaults")
69+
pytest.xfail("casts to and from V10 segfault")
70+
71+
with pytest.raises(TypeError, match="cast"):
72+
np.array(1, dtype=dtype).astype(QuadPrecDType, casting="unsafe")
7573

7674
with pytest.raises(TypeError, match="cast"):
7775
np.array(QuadPrecision(1)).astype(dtype, casting="unsafe")

0 commit comments

Comments
 (0)