File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 24
24
import os .path
25
25
import re
26
26
27
+ import pytest
28
+
27
29
import dpctl
28
30
29
31
@@ -95,3 +97,20 @@ def test___version__():
95
97
r"0|[1-9][0-9]*))?(\+.*)?$"
96
98
)
97
99
assert re .match (reg_expr , dpctl_ver ) is not None
100
+
101
+
102
+ def test_dev_utils ():
103
+ import dpctl ._dev as dd
104
+
105
+ with dd .verbose ():
106
+ dpctl .SyclDevice ().parent_device
107
+ with dd .verbose (verbosity = "error" ):
108
+ dpctl .SyclDevice ().parent_device
109
+ with pytest .raises (ValueError ):
110
+ with dd .verbose (verbosity = "blah" ):
111
+ dpctl .SyclDevice ().parent_device
112
+ with dd .verbose (log_dir = "/tmp" ):
113
+ dpctl .SyclDevice ().parent_device
114
+ with pytest .raises (ValueError ):
115
+ with dd .verbose (log_dir = "/not_a_dir" ):
116
+ dpctl .SyclDevice ().parent_device
You can’t perform that action at this time.
0 commit comments