Skip to content

Commit aad4126

Browse files
Update Lib/test/test_asyncio/test_taskgroups.py
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 147f0f4 commit aad4126

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_asyncio/test_taskgroups.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,9 @@ async def fn():
12501250
async with asyncio.TaskGroup() as tg:
12511251
tg.create_task(t())
12521252

1253-
with self.assertRaises(BaseExceptionGroup):
1253+
with self.assertRaises(BaseExceptionGroup) as cm:
12541254
await fn()
1255+
self.assertEqual(get_error_types(cm.exception), {GeneratorExit})
12551256

12561257
async def test_taskgroup_generator_exit_03(self):
12571258
# A GeneratorExit in one task and an error in another should

0 commit comments

Comments
 (0)