There was an error while loading. Please reload this page.
1 parent 131b0b8 commit 8f4049aCopy full SHA for 8f4049a
1 file changed
Lib/test/test_asyncio/test_taskgroups.py
@@ -1170,9 +1170,10 @@ async def body():
1170
1171
task = asyncio.create_task(body())
1172
await asyncio.sleep(0.01)
1173
- task.cancel()
1174
- with self.assertRaises(asyncio.CancelledError):
+ task.cancel('message')
+ with self.assertRaises(asyncio.CancelledError) as cm:
1175
await task
1176
+ self.assertEqual('message', cm.exception.args[0])
1177
1178
async def test_taskgroup_cancel_before_exception(self):
1179
async def raise_exc(parent_tg: asyncio.TaskGroup):
0 commit comments