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

(cherry picked from commit 6f75bae748)

Co-authored-by: Yury Selivanov <yury@magic.io>
This commit is contained in:
Miss Islington (bot) 2018-05-29 17:40:54 -07:00 committed by Yury Selivanov
parent 4f53e2ac16
commit 3ddee64587
1 changed files with 3 additions and 3 deletions

View File

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