summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_pep492.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-14 19:35:14 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-14 19:35:14 (GMT)
commit14f7b8bfb2d9890e27040c352d162f05966a2035 (patch)
tree8144d639344fc1b6a622468b8a8a08065a794e73 /Lib/test/test_asyncio/test_pep492.py
parentd8683762884e82c81b8c5c0db8aa4045c3fbb284 (diff)
parentbb78adeece6cb87c0e20eec36f65cad7c23f27af (diff)
downloadcpython-14f7b8bfb2d9890e27040c352d162f05966a2035.zip
cpython-14f7b8bfb2d9890e27040c352d162f05966a2035.tar.gz
cpython-14f7b8bfb2d9890e27040c352d162f05966a2035.tar.bz2
Merge 3.5 (issue #24867)
Diffstat (limited to 'Lib/test/test_asyncio/test_pep492.py')
-rw-r--r--Lib/test/test_asyncio/test_pep492.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py
index b702efc..41e1b8a 100644
--- a/Lib/test/test_asyncio/test_pep492.py
+++ b/Lib/test/test_asyncio/test_pep492.py
@@ -186,6 +186,23 @@ class CoroutineTests(BaseTest):
data = self.loop.run_until_complete(coro())
self.assertEqual(data, 'spam')
+ def test_task_print_stack(self):
+ T = None
+
+ async def foo():
+ f = T.get_stack(limit=1)
+ try:
+ self.assertEqual(f[0].f_code.co_name, 'foo')
+ finally:
+ f = None
+
+ async def runner():
+ nonlocal T
+ T = asyncio.ensure_future(foo(), loop=self.loop)
+ await T
+
+ self.loop.run_until_complete(runner())
+
if __name__ == '__main__':
unittest.main()