mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)
This commit is contained in:
parent
3dfbaf51f0
commit
0cf16f9ea0
7 changed files with 158 additions and 44 deletions
|
@ -370,7 +370,8 @@ class BaseFutureTests:
|
|||
def test():
|
||||
arg1, arg2 = coro()
|
||||
|
||||
self.assertRaises(AssertionError, test)
|
||||
with self.assertRaisesRegex(RuntimeError, "await wasn't used"):
|
||||
test()
|
||||
fut.cancel()
|
||||
|
||||
@mock.patch('asyncio.base_events.logger')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue