From 04edcc9a0c18662161c8cbe7c53f5b676d351c2c Mon Sep 17 00:00:00 2001 From: Vladislav Perevezentsev Date: Fri, 10 Feb 2023 13:25:42 +0100 Subject: [PATCH] Add double type support check condition for test_print_repr --- dpctl/tests/test_usm_ndarray_print.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpctl/tests/test_usm_ndarray_print.py b/dpctl/tests/test_usm_ndarray_print.py index 8d4e3d9b7f..e876a8a6d0 100644 --- a/dpctl/tests/test_usm_ndarray_print.py +++ b/dpctl/tests/test_usm_ndarray_print.py @@ -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])"