@@ -299,6 +299,9 @@ async def test_timeout_in_block(self):
299
299
with self .assertRaises (asyncio .TimeoutError ):
300
300
await asyncio .wait_for (condition .wait (), timeout = 0.5 )
301
301
302
+ @unittest .skipIf (
303
+ sys .version_info < (3 , 11 ), "raising the same cancelled error requires Python>=3.11"
304
+ )
302
305
async def test_cancelled_error_wakeup (self ):
303
306
# Test that a cancelled error, received when awaiting wakeup,
304
307
# will be re-raised un-modified.
@@ -325,6 +328,9 @@ async def func():
325
328
# originally raised.
326
329
self .assertIs (err .exception , raised )
327
330
331
+ @unittest .skipIf (
332
+ sys .version_info < (3 , 11 ), "raising the same cancelled error requires Python>=3.11"
333
+ )
328
334
async def test_cancelled_error_re_aquire (self ):
329
335
# Test that a cancelled error, received when re-aquiring lock,
330
336
# will be re-raised un-modified.
@@ -357,6 +363,7 @@ async def func():
357
363
# originally raised.
358
364
self .assertIs (err .exception , raised )
359
365
366
+ @unittest .skipIf (sys .version_info < (3 , 11 ), "asyncio.timeout requires Python>=3.11" )
360
367
async def test_cancelled_wakeup (self ):
361
368
# Test that a task cancelled at the "same" time as it is woken
362
369
# up as part of a Condition.notify() does not result in a lost wakeup.
@@ -402,6 +409,7 @@ async def consumer():
402
409
condition .notify_all ()
403
410
await c [1 ]
404
411
412
+ @unittest .skipIf (sys .version_info < (3 , 11 ), "asyncio.timeout requires Python>=3.11" )
405
413
async def test_cancelled_wakeup_relock (self ):
406
414
# Test that a task cancelled at the "same" time as it is woken
407
415
# up as part of a Condition.notify() does not result in a lost wakeup.
0 commit comments