From e0aef4f3cd339a405d2a7fbd35a50afa64834f84 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Mon, 25 Dec 2017 16:16:10 -0500 Subject: bpo-31721: Allow Future._log_traceback to only be set to False (#5009) --- Lib/test/test_asyncio/test_futures.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/test/test_asyncio/test_futures.py') 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) -- cgit v1.2.1