🌐 AI搜索 & 代理 主页
Skip to content
Prev Previous commit
Next Next commit
Update Lib/test/test_asyncio/test_taskgroups.py
  • Loading branch information
graingert authored Jan 7, 2025
commit 9df724eea736d2117961444573a2c10912eb1073
2 changes: 2 additions & 0 deletions Lib/test/test_asyncio/test_taskgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ async def test_taskgroup_without_parent_task(self):
coro = asyncio.sleep(0)
with self.assertRaisesRegex(RuntimeError, "has not been entered"):
tg.create_task(coro)
# We still have to await coro to avoid a warning
await coro

async def test_coro_closed_when_tg_closed(self):
async def run_coro_after_tg_closes():
Expand Down
Loading