Skip to content

Commit 8e1132c

Browse files
Wrap SyclQueue constructor in try/catch
1 parent 3e792b8 commit 8e1132c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,10 @@ def test_pyx_capi_check_constants():
588588
)
589589
@pytest.mark.parametrize("usm_type", ["device", "shared", "host"])
590590
def test_tofrom_numpy(shape, dtype, usm_type):
591-
q = dpctl.SyclQueue()
591+
try:
592+
q = dpctl.SyclQueue()
593+
except dpctl.SyclQueueCreationError:
594+
pytest.skip("Could nto create default SyclQueue")
592595
Xnp = np.zeros(shape, dtype=dtype)
593596
Xusm = dpt.from_numpy(Xnp, usm_type=usm_type, sycl_queue=q)
594597
Ynp = np.ones(shape, dtype=dtype)

0 commit comments

Comments
 (0)