Skip to content

Commit 0ee8e5f

Browse files
Improved coverage of _typing.pxi
1 parent 43f32df commit 0ee8e5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def test_allocate_usm_ndarray(shape, usm_type):
8282
def test_dtypes(dtype):
8383
Xusm = dpt.usm_ndarray((1,), dtype=dtype)
8484
assert Xusm.itemsize == np.dtype(dtype).itemsize
85+
expected_fmt = (np.dtype(dtype).str)[1:]
86+
actual_fmt = Xusm.__sycl_usm_array_interface__["typestr"][1:]
87+
assert expected_fmt == actual_fmt
8588

8689

8790
@pytest.mark.parametrize("dtype", ["", ">f4", "invalid", 123])

0 commit comments

Comments
 (0)