summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_futures.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-25 16:16:10 -0500
committerGitHub <noreply@github.com>2017-12-25 16:16:10 -0500
commite0aef4f3cd339a405d2a7fbd35a50afa64834f84 (patch)
tree3d141ffc779ca6159b2e193d95ef6e76509612ae /Lib/test/test_asyncio/test_futures.py
parent3070b71e5eedf62e49b8e7dedab75742a5f67ece (diff)
downloadcpython-git-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.tar.gz
bpo-31721: Allow Future._log_traceback to only be set to False (#5009)
Diffstat (limited to 'Lib/test/test_asyncio/test_futures.py')
-rw-r--r--Lib/test/test_asyncio/test_futures.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
index d3396162ba..ab45ee39ab 100644
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -374,6 +374,11 @@ class BaseFutureTests:
test()
fut.cancel()
+ def test_log_traceback(self):
+ fut = self._new_future(loop=self.loop)
+ with self.assertRaisesRegex(ValueError, 'can only be set to False'):
+ fut._log_traceback = True
+
@mock.patch('asyncio.base_events.logger')
def test_tb_logger_abandoned(self, m_log):
fut = self._new_future(loop=self.loop)