File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
numba_dpex/tests/dpjit_tests/dpnp Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 55"""Tests for dpnp ndarray constructors."""
66
77import math
8+ import platform
89
910import dpctl
1011import dpnp
@@ -52,7 +53,16 @@ def func(shape, fill_value):
5253
5354 dummy = dpnp .full (shape , fill_value )
5455
55- assert c .dtype == dummy .dtype
56+ if c .dtype != dummy .dtype :
57+ if platform .system ().lower () != "linux" :
58+ pytest .xfail (
59+ "Ddefault bit length is not as same as that of linux for {0:s}" .format (
60+ str (dummy .dtype )
61+ )
62+ )
63+ else :
64+ pytest .fail ("The dtype of the returned array doesn't conform." )
65+
5666 assert c .usm_type == dummy .usm_type
5767 assert c .sycl_device == dummy .sycl_device
5868 if c .sycl_queue != dummy .sycl_queue :
Original file line number Diff line number Diff line change 55"""Tests for dpnp ndarray constructors."""
66
77import math
8+ import platform
89
910import dpctl
1011import dpctl .tensor as dpt
@@ -54,7 +55,16 @@ def func(x, fill_value):
5455
5556 dummy = dpnp .full_like (a , fill_value )
5657
57- assert c .dtype == dummy .dtype
58+ if c .dtype != dummy .dtype :
59+ if platform .system ().lower () != "linux" :
60+ pytest .xfail (
61+ "Ddefault bit length is not as same as that of linux for {0:s}" .format (
62+ str (dummy .dtype )
63+ )
64+ )
65+ else :
66+ pytest .fail ("The dtype of the returned array doesn't conform." )
67+
5868 assert c .usm_type == dummy .usm_type
5969 assert c .sycl_device == dummy .sycl_device
6070 if c .sycl_queue != dummy .sycl_queue :
You can’t perform that action at this time.
0 commit comments