Skip to content

Commit b1ee6d1

Browse files
Merge pull request #1070 from vlad-perevezentsev/fix_test_print_repr
Add double type support check condition for test_print_repr
2 parents b10be36 + 04edcc9 commit b1ee6d1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/tests/test_usm_ndarray_print.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ def test_print_repr(self):
256256
assert repr(x) == "usm_ndarray(0)"
257257

258258
x = dpt.asarray([np.nan, np.inf], sycl_queue=q)
259-
assert repr(x) == "usm_ndarray([nan, inf])"
259+
if x.sycl_device.has_aspect_fp64:
260+
assert repr(x) == "usm_ndarray([nan, inf])"
261+
else:
262+
assert repr(x) == "usm_ndarray([nan, inf], dtype=float32)"
260263

261264
x = dpt.arange(9, sycl_queue=q, dtype="int64")
262265
assert repr(x) == "usm_ndarray([0, 1, 2, 3, 4, 5, 6, 7, 8])"

0 commit comments

Comments
 (0)