[Python-checkins] bpo-32684: Fix nits in tests (GH-7225)
Yury Selivanov
webhook-mailer at python.org
Tue May 29 19:20:29 EDT 2018
https://github.com/python/cpython/commit/6f75bae74866b6acf638e3aa610d830d55b7e314
commit: 6f75bae74866b6acf638e3aa610d830d55b7e314
branch: master
author: Yury Selivanov <yury at magic.io>
committer: GitHub <noreply at github.com>
date: 2018-05-29T19:20:26-04:00
summary:
bpo-32684: Fix nits in tests (GH-7225)
files:
M Lib/test/test_asyncio/test_tasks.py
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 1282a98c218f..d95c98f0a617 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2131,15 +2131,15 @@ def test_cancel_gather_2(self):
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
More information about the Python-checkins
mailing list