File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,16 @@ def test_context_arg(self):
125
125
def cb ():
126
126
pass
127
127
128
- with self .assertRaisesRegex (RuntimeError , 'requires Python 3.7' ):
128
+ with self .assertRaisesRegex (NotImplementedError ,
129
+ 'requires Python 3.7' ):
129
130
self .loop .call_soon (cb , context = 1 )
130
131
131
- with self .assertRaisesRegex (RuntimeError , 'requires Python 3.7' ):
132
+ with self .assertRaisesRegex (NotImplementedError ,
133
+ 'requires Python 3.7' ):
132
134
self .loop .call_soon_threadsafe (cb , context = 1 )
133
135
134
- with self .assertRaisesRegex (RuntimeError , 'requires Python 3.7' ):
136
+ with self .assertRaisesRegex (NotImplementedError ,
137
+ 'requires Python 3.7' ):
135
138
self .loop .call_later (0.1 , cb , context = 1 )
136
139
137
140
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ cdef class Handle:
21
21
self .context = context
22
22
else :
23
23
if context is not None :
24
- raise RuntimeError (' "context" argument requires Python 3.7' )
24
+ raise NotImplementedError (
25
+ ' "context" argument requires Python 3.7' )
25
26
self .context = None
26
27
27
28
def __dealloc__ (self ):
@@ -182,7 +183,8 @@ cdef class TimerHandle:
182
183
self .context = context
183
184
else :
184
185
if context is not None :
185
- raise RuntimeError (' "context" argument requires Python 3.7' )
186
+ raise NotImplementedError (
187
+ ' "context" argument requires Python 3.7' )
186
188
self .context = None
187
189
188
190
if loop._debug:
You can’t perform that action at this time.
0 commit comments