Skip to content

Commit 84b0232

Browse files
Removed exceptions from tests now that bool is supported by DLPack
1 parent 0bc9bac commit 84b0232

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dpctl/tests/test_usm_ndarray_dlpack.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ def test_from_dlpack(shape, typestr, usm_type):
101101
X = dpt.empty(shape, dtype=typestr, usm_type=usm_type, device=sycl_dev)
102102
Y = dpt.from_dlpack(X)
103103
assert X.shape == Y.shape
104-
assert X.dtype == Y.dtype or (
105-
str(X.dtype) == "bool" and str(Y.dtype) == "uint8"
106-
)
104+
assert X.dtype == Y.dtype
107105
assert X.sycl_device == Y.sycl_device
108106
assert X.usm_type == Y.usm_type
109107
assert X._pointer == Y._pointer
@@ -125,9 +123,7 @@ def test_from_dlpack_strides(mod, typestr, usm_type):
125123
X = X0[slice(-start - 1, None, -mod)]
126124
Y = dpt.from_dlpack(X)
127125
assert X.shape == Y.shape
128-
assert X.dtype == Y.dtype or (
129-
str(X.dtype) == "bool" and str(Y.dtype) == "uint8"
130-
)
126+
assert X.dtype == Y.dtype
131127
assert X.sycl_device == Y.sycl_device
132128
assert X.usm_type == Y.usm_type
133129
assert X._pointer == Y._pointer

0 commit comments

Comments
 (0)