mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Close #19967: Thanks to the PEP 442, asyncio.Future can use a destructor in
Python 3.4 to log "uncatched" exceptions, instead of the dedicated _TracebackLogger class.
This commit is contained in:
parent
994bf4332f
commit
4c3c699e62
2 changed files with 27 additions and 7 deletions
|
|
@ -1352,6 +1352,7 @@ class GatherTestsBase:
|
|||
c.set_result(3)
|
||||
d.cancel()
|
||||
e.set_exception(RuntimeError())
|
||||
e.exception()
|
||||
|
||||
def test_return_exceptions(self):
|
||||
a, b, c, d = [futures.Future(loop=self.one_loop) for i in range(4)]
|
||||
|
|
@ -1431,6 +1432,7 @@ class FutureGatherTests(GatherTestsBase, unittest.TestCase):
|
|||
c.set_result(3)
|
||||
d.cancel()
|
||||
e.set_exception(RuntimeError())
|
||||
e.exception()
|
||||
|
||||
def test_result_exception_one_cancellation(self):
|
||||
a, b, c, d, e, f = [futures.Future(loop=self.one_loop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue