diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_call.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py index 6936f09..07355e8 100644 --- a/Lib/test/test_call.py +++ b/Lib/test/test_call.py @@ -26,6 +26,18 @@ class FunctionCalls(unittest.TestCase): self.assertIsInstance(res, dict) self.assertEqual(list(res.items()), expected) + def test_frames_are_popped_after_failed_calls(self): + # GH-93252: stuff blows up if we don't pop the new frame after + # recovering from failed calls: + def f(): + pass + for _ in range(1000): + try: + f(None) + except TypeError: + pass + # BOOM! + @cpython_only class CFunctionCallsErrorMessages(unittest.TestCase): |