bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928)

This commit is contained in:
Andrew Svetlov 2019-09-11 16:07:37 +03:00 committed by GitHub
parent 781266ebb6
commit 9aee90018a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 156 additions and 159 deletions

View file

@ -206,7 +206,7 @@ class CoroutineTests(BaseTest):
async def runner():
coro = afunc()
t = asyncio.Task(coro, loop=self.loop)
t = self.loop.create_task(coro)
try:
await asyncio.sleep(0)
await coro