@@ -70,6 +70,11 @@ def test_create_event_from_capsule():
70
70
pytest .fail ("Failed to create an event from capsule" )
71
71
72
72
73
+ def test_invalid_constructor_arg ():
74
+ with pytest .raises (TypeError ):
75
+ dpctl .SyclEvent (list ())
76
+
77
+
73
78
def test_wait_with_event ():
74
79
event = dpctl .SyclEvent ()
75
80
try :
@@ -83,6 +88,11 @@ def test_wait_with_event():
83
88
pytest .fail ("Failed to wait for the event" )
84
89
85
90
91
+ def test_wait_for_invalid ():
92
+ with pytest .raises (TypeError ):
93
+ dpctl .SyclEvent .wait_for (77 )
94
+
95
+
86
96
def test_wait_with_list ():
87
97
event_1 = dpctl .SyclEvent ()
88
98
event_2 = dpctl .SyclEvent ()
@@ -101,11 +111,27 @@ def test_execution_status():
101
111
assert event_status == esty .complete
102
112
103
113
114
+ def test_execution_status_nondefault_event ():
115
+ event = produce_event ()
116
+ try :
117
+ event_status = event .execution_status
118
+ except ValueError :
119
+ pytest .fail ("Failed to get an event status" )
120
+ assert type (event_status ) is esty
121
+ wl = event .get_wait_list ()
122
+ assert type (wl ) is list
123
+
124
+
104
125
def test_backend ():
105
126
try :
106
127
dpctl .SyclEvent ().backend
107
128
except ValueError :
108
129
pytest .fail ("Failed to get backend from event" )
130
+ event = produce_event ()
131
+ try :
132
+ event .backend
133
+ except ValueError :
134
+ pytest .fail ("Failed to get backend from event" )
109
135
110
136
111
137
@pytest .mark .skip (reason = "event::get_wait_list() method returns wrong result" )
0 commit comments