bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)

This commit is contained in:
Yury Selivanov 2017-12-25 10:48:15 -05:00 committed by GitHub
parent 3dfbaf51f0
commit 0cf16f9ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 158 additions and 44 deletions

View file

@ -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')