gh-92118: Add test for traceback when exception is modified by (Async)ExitStack.__exit__ (GH-92339)

This commit is contained in:
Irit Katriel 2022-05-05 12:39:33 -04:00 committed by GitHub
parent ae553b3561
commit e65e587f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View file

@ -487,6 +487,13 @@ class TestAsyncExitStack(TestBaseExitStack, unittest.TestCase):
return self.run_coroutine(self.__aexit__(*exc_details))
exit_stack = SyncAsyncExitStack
callback_error_internal_frames = [
('__exit__', 'return self.run_coroutine(self.__aexit__(*exc_details))'),
('run_coroutine', 'raise exc'),
('run_coroutine', 'raise exc'),
('__aexit__', 'raise exc_details[1]'),
('__aexit__', 'cb_suppress = cb(*exc_details)'),
]
def setUp(self):
self.loop = asyncio.new_event_loop()