summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-12-01 16:37:47 (GMT)
committerYury Selivanov <yury@magic.io>2016-12-01 16:37:47 (GMT)
commitedfe8869c8e888e676091c87330b3bf0f3d9814b (patch)
tree79374edcc19752888503e0c5f9f45b24e709aaf7 /Lib/test
parent4778eab1f2b70cd2431252cae987e4adb3729ce8 (diff)
downloadcpython-edfe8869c8e888e676091c87330b3bf0f3d9814b.zip
cpython-edfe8869c8e888e676091c87330b3bf0f3d9814b.tar.gz
cpython-edfe8869c8e888e676091c87330b3bf0f3d9814b.tar.bz2
Merge 3.6 (issue #28843)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index e048380..a18d49a 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -1952,6 +1952,21 @@ class BaseTaskTests:
self.assertFalse(gather_task.cancelled())
self.assertEqual(gather_task.result(), [42])
+ def test_exception_traceback(self):
+ # See http://bugs.python.org/issue28843
+
+ @asyncio.coroutine
+ def foo():
+ 1 / 0
+
+ @asyncio.coroutine
+ def main():
+ task = self.new_task(self.loop, foo())
+ yield # skip one loop iteration
+ self.assertIsNotNone(task.exception().__traceback__)
+
+ self.loop.run_until_complete(main())
+
@mock.patch('asyncio.base_events.logger')
def test_error_in_call_soon(self, m_log):
def call_soon(callback, *args):