mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
bpo-31721: Allow Future._log_traceback to only be set to False (#5009)
This commit is contained in:
parent
3070b71e5e
commit
e0aef4f3cd
5 changed files with 37 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue