summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-01-28 19:09:40 (GMT)
committerGitHub <noreply@github.com>2018-01-28 19:09:40 (GMT)
commitbec2372b7e1da5dfdbadaf242aa8e994b164cace (patch)
treedb2005e235a7e6d82bb49a698eb5b91dd69414c5 /Lib/test/test_asyncio
parenta4d00012565d716db6e6abe1b8f33eaaa4de416e (diff)
downloadcpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.zip
cpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.tar.gz
cpython-bec2372b7e1da5dfdbadaf242aa8e994b164cace.tar.bz2
bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)
I've run some tests on 3.7 asyncio and it appears that too many things assume that run_in_executor returns a Future.
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 822338f..19cf1e6 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2999,9 +2999,8 @@ class RunCoroutineThreadsafeTests(test_utils.TestCase):
def task_factory(loop, coro):
raise NameError
- run = self.loop.create_task(
- self.loop.run_in_executor(
- None, lambda: self.target(advance_coro=True)))
+ run = self.loop.run_in_executor(
+ None, lambda: self.target(advance_coro=True))
# Set exception handler
callback = test_utils.MockCallback()