summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index dbf130c..778b6e0 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -380,6 +380,17 @@ class TaskTests(unittest.TestCase):
self.assertEqual(foo_running, False)
+ def test_wait_for_blocking(self):
+ loop = test_utils.TestLoop()
+ self.addCleanup(loop.close)
+
+ @asyncio.coroutine
+ def coro():
+ return 'done'
+
+ res = loop.run_until_complete(asyncio.wait_for(coro(), timeout=None, loop=loop))
+ self.assertEqual(res, 'done')
+
def test_wait_for_with_global_loop(self):
def gen():