Skip to content

Commit c825935

Browse files
committed
skip devices without the USM aspect in test_pickling_preserves_queue
1 parent 234b298 commit c825935

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎dpctl/tests/test_sycl_usm.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,12 @@ def test_pickling_reconstructor_invalid_type():
189189
def test_pickling_preserves_queue(memory_ctor):
190190
import pickle
191191

192-
devs = dpctl.get_devices()
192+
aspect = f"usm_{expected_usm_type_str(memory_ctor)}_allocations"
193+
devs = [
194+
d for d in dpctl.get_devices() if getattr(d, f"has_aspect_{aspect}")
195+
]
193196
if not devs:
194-
pytest.skip("No SYCL devices available")
197+
pytest.skip(f"No SYCL devices with {aspect} available")
195198
for dev in devs:
196199
q = dpctl.SyclQueue(dev, property="in_order")
197200
mobj = memory_ctor(64, queue=q)

0 commit comments

Comments
 (0)