Skip to content

Commit

Permalink
Add double type support check condition for test_print_repr
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-perevezentsev committed Feb 10, 2023
1 parent b10be36 commit 04edcc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dpctl/tests/test_usm_ndarray_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ def test_print_repr(self):
assert repr(x) == "usm_ndarray(0)"

x = dpt.asarray([np.nan, np.inf], sycl_queue=q)
assert repr(x) == "usm_ndarray([nan, inf])"
if x.sycl_device.has_aspect_fp64:
assert repr(x) == "usm_ndarray([nan, inf])"
else:
assert repr(x) == "usm_ndarray([nan, inf], dtype=float32)"

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

0 comments on commit 04edcc9

Please sign in to comment.