diff options
| author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-05-05 16:39:33 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-05 16:39:33 (GMT) |
| commit | e65e587f9320947d73817fbe62c11d2a0fd50dfb (patch) | |
| tree | 34a2266a5d5de238444a4c76a8967d2463e62113 /Lib/test/test_contextlib_async.py | |
| parent | ae553b3561f0f8e1fed454bbbd55073e4ba711eb (diff) | |
| download | cpython-e65e587f9320947d73817fbe62c11d2a0fd50dfb.zip cpython-e65e587f9320947d73817fbe62c11d2a0fd50dfb.tar.gz cpython-e65e587f9320947d73817fbe62c11d2a0fd50dfb.tar.bz2 | |
gh-92118: Add test for traceback when exception is modified by (Async)ExitStack.__exit__ (GH-92339)
Diffstat (limited to 'Lib/test/test_contextlib_async.py')
| -rw-r--r-- | Lib/test/test_contextlib_async.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_contextlib_async.py b/Lib/test/test_contextlib_async.py index 462e05c..76bd81c 100644 --- a/Lib/test/test_contextlib_async.py +++ b/Lib/test/test_contextlib_async.py @@ -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() |
