diff options
author | Yury Selivanov <yury@magic.io> | 2017-12-25 16:16:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-25 16:16:10 -0500 |
commit | e0aef4f3cd339a405d2a7fbd35a50afa64834f84 (patch) | |
tree | 3d141ffc779ca6159b2e193d95ef6e76509612ae /Lib/test/test_asyncio/test_tasks.py | |
parent | 3070b71e5eedf62e49b8e7dedab75742a5f67ece (diff) | |
download | cpython-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.tar.gz cpython-e0aef4f3cd339a405d2a7fbd35a50afa64834f84.zip |
bpo-31721: Allow Future._log_traceback to only be set to False (#5009)
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r-- | Lib/test/test_asyncio/test_tasks.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index 0dc6c32fde4..26e4f643d1a 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -623,6 +623,15 @@ class BaseTaskTests: t.cancel() self.assertRaises(asyncio.CancelledError, loop.run_until_complete, t) + def test_log_traceback(self): + async def coro(): + pass + + task = self.new_task(self.loop, coro()) + with self.assertRaisesRegex(ValueError, 'can only be set to False'): + task._log_traceback = True + self.loop.run_until_complete(task) + def test_wait_for_timeout_less_then_0_or_0_future_done(self): def gen(): when = yield |