]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-100113: remove remaining `yield from` usage from `asyncio` tests (#100114)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Fri, 9 Dec 2022 03:52:18 +0000 (09:22 +0530)
committerGitHub <noreply@github.com>
Fri, 9 Dec 2022 03:52:18 +0000 (09:22 +0530)
Lib/test/test_asyncio/test_tasks.py

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