File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1165,27 +1165,6 @@ async def child(tg):
11651165 task = tg .create_task (child (tg ))
11661166 self .assertTrue (task .cancelled ())
11671167
1168- async def test_taskgroup_cancel_keeps_outer_cancellation (self ):
1169- # gh-155433: any cancellation from outside the group must propagate.
1170- async def child ():
1171- try :
1172- await asyncio .sleep (10 )
1173- finally :
1174- await asyncio .sleep (0.1 )
1175-
1176- async def body ():
1177- async with asyncio .TaskGroup () as tg :
1178- tg .create_task (child ())
1179- await asyncio .sleep (0 )
1180- tg .cancel ()
1181-
1182- task = asyncio .create_task (body ())
1183- await asyncio .sleep (0.01 )
1184- task .cancel ('message' )
1185- with self .assertRaises (asyncio .CancelledError ) as cm :
1186- await task
1187- self .assertEqual ('message' , cm .exception .args [0 ])
1188-
11891168 async def test_taskgroup_cancel_before_exception (self ):
11901169 async def raise_exc (parent_tg : asyncio .TaskGroup ):
11911170 parent_tg .cancel ()
You can’t perform that action at this time.
0 commit comments