Skip to content

Commit 4cdef99

Browse files
committed
T and S10 TBA
1 parent a38a651 commit 4cdef99

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

quaddtype/tests/test_quaddtype.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -540,17 +540,17 @@ def test_supported_astype(dtype):
540540
assert back == orig
541541

542542

543-
# @pytest.mark.parametrize("dtype", ["S10", "U10", "T", "V10", "datetime64[ms]", "timedelta64[ms]"])
544-
# def test_unsupported_astype(dtype):
545-
# if dtype == "V10":
546-
# with pytest.raises(TypeError, match="cast"):
547-
# np.ones((3, 3), dtype="V10").astype(QuadPrecDType, casting="unsafe")
548-
# else:
549-
# with pytest.raises(TypeError, match="cast"):
550-
# np.array(1, dtype=dtype).astype(QuadPrecDType, casting="unsafe")
551-
552-
# with pytest.raises(TypeError, match="cast"):
553-
# np.array(QuadPrecision(1)).astype(dtype, casting="unsafe")
543+
@pytest.mark.parametrize("dtype", ["V10", "datetime64[ms]", "timedelta64[ms]"])
544+
def test_unsupported_astype(dtype):
545+
if dtype == "V10":
546+
with pytest.raises(TypeError, match="cast"):
547+
np.ones((3, 3), dtype="V10").astype(QuadPrecDType, casting="unsafe")
548+
else:
549+
with pytest.raises(TypeError, match="cast"):
550+
np.array(1, dtype=dtype).astype(QuadPrecDType, casting="unsafe")
551+
552+
with pytest.raises(TypeError, match="cast"):
553+
np.array(QuadPrecision(1)).astype(dtype, casting="unsafe")
554554

555555
class TestArrayCastStringBytes:
556556
@pytest.mark.parametrize("strtype", [np.str_, str])

0 commit comments

Comments
 (0)