We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbfec84 commit 9a5715fCopy full SHA for 9a5715f
dpctl/tests/test_usm_ndarray_ctor.py
@@ -2380,16 +2380,17 @@ def __sycl_usm_array_interface__(self):
2380
return _suai
2381
2382
2383
-def test_asarray_writable_flag():
+@pytest.mark.parametrize("ro_flag", [True, False])
2384
+def test_asarray_writable_flag(ro_flag):
2385
try:
2386
a = dpt.empty(8)
2387
except dpctl.SyclDeviceCreationError:
2388
pytest.skip("No SYCL devices available")
2389
- a.flags["W"] = False
2390
+ a.flags["W"] = not ro_flag
2391
wrapped = ObjWithSyclUsmArrayInterface(a)
2392
2393
b = dpt.asarray(wrapped)
2394
- assert not b.flags["W"]
2395
+ assert b.flags["W"] == (not ro_flag)
2396
assert b._pointer == a._pointer
0 commit comments