GH-100113: remove remaining yield from usage from asyncio tests (#100114)

This commit is contained in:
Kumar Aditya 2022-12-09 09:22:18 +05:30 committed by GitHub
parent 286e3c76a9
commit 0448deac70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2092,8 +2092,8 @@ class BaseTaskTests:
async def create(): async def create():
# The indirection fut->child_coro is needed since otherwise the # The indirection fut->child_coro is needed since otherwise the
# gathering task is done at the same time as the child future # gathering task is done at the same time as the child future
def child_coro(): async def child_coro():
return (yield from fut) return await fut
gather_future = asyncio.gather(child_coro()) gather_future = asyncio.gather(child_coro())
return asyncio.ensure_future(gather_future) return asyncio.ensure_future(gather_future)
gather_task = loop.run_until_complete(create()) gather_task = loop.run_until_complete(create())