Skip to content

Commit fcc302a

Browse files
Make sure both arrays have the same allocation queue
1 parent f48cf30 commit fcc302a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,12 @@ def test_setitem_scalar(dtype, usm_type):
684684

685685

686686
def test_setitem_errors():
687-
X = dpt.usm_ndarray((4,), dtype="u1")
688-
Y = dpt.usm_ndarray((4, 2), dtype="u1")
687+
try:
688+
q = dpctl.SyclQueue()
689+
except dpctl.SyclQueueCreationError:
690+
pytest.skip("Default queue could not be created")
691+
X = dpt.empty((4,), dtype="u1", sycl_queue=q)
692+
Y = dpt.empty((4, 2), dtype="u1", sycl_queue=q)
689693
with pytest.raises(ValueError):
690694
X[:] = Y
691695
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)