bpo-32684: Fix nits in tests (GH-7225)

This commit is contained in:
Yury Selivanov 2018-05-29 19:20:26 -04:00 committed by GitHub
parent a34e424bdb
commit 6f75bae748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2131,15 +2131,15 @@ class BaseTaskTests:
time = 0
while True:
time += 0.05
await asyncio.gather(asyncio.sleep(0.05),
await asyncio.gather(asyncio.sleep(0.05, loop=loop),
return_exceptions=True,
loop=loop)
if time > 1:
return
async def main():
qwe = asyncio.Task(test())
await asyncio.sleep(0.2)
qwe = self.new_task(loop, test())
await asyncio.sleep(0.2, loop=loop)
qwe.cancel()
try:
await qwe