From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 30 May 2018 00:40:54 +0000 (-0700) Subject: bpo-32684: Fix nits in tests (GH-7225) (#7231) X-Git-Tag: v3.7.0b5~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ddee64587482082fcbab930ff82ed67aa9f4a0d;p=python bpo-32684: Fix nits in tests (GH-7225) (#7231) (cherry picked from commit 6f75bae74866b6acf638e3aa610d830d55b7e314) Co-authored-by: Yury Selivanov --- diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index 1282a98c21..d95c98f0a6 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -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