File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change 18
18
"""
19
19
20
20
import pytest
21
- from helper import has_sycl_platforms
22
21
23
22
import dpctl
24
23
import dpctl .memory
@@ -30,12 +29,11 @@ def _create_memory(q):
30
29
return mobj
31
30
32
31
33
- @pytest .mark .skipif (
34
- not has_sycl_platforms (),
35
- reason = "No SYCL devices except the default host device." ,
36
- )
37
32
def test_memcpy_copy_usm_to_usm ():
38
- q = dpctl .SyclQueue ()
33
+ try :
34
+ q = dpctl .SyclQueue ()
35
+ except dpctl .SyclQueueCreationError :
36
+ pytest .skip ("Default constructor for SyclQueue failed" )
39
37
mobj1 = _create_memory (q )
40
38
mobj2 = _create_memory (q )
41
39
@@ -49,12 +47,11 @@ def test_memcpy_copy_usm_to_usm():
49
47
assert mv2 [:3 ], b"123"
50
48
51
49
52
- # @pytest.mark.skipif(
53
- # not has_sycl_platforms(),
54
- # reason="No SYCL devices except the default host device."
55
- # )
56
50
def test_memcpy_type_error ():
57
- q = dpctl .SyclQueue ()
51
+ try :
52
+ q = dpctl .SyclQueue ()
53
+ except dpctl .SyclQueueCreationError :
54
+ pytest .skip ("Default constructor for SyclQueue failed" )
58
55
mobj = _create_memory (q )
59
56
60
57
with pytest .raises (TypeError ) as cm :
You can’t perform that action at this time.
0 commit comments