Skip to content

Commit d0b41d1

Browse files
committed
Add failing regression test
1 parent be862b4 commit d0b41d1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Lib/test/test_call.py

+12
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ def fn(**kw):
2626
self.assertIsInstance(res, dict)
2727
self.assertEqual(list(res.items()), expected)
2828

29+
def test_frames_are_popped_after_failed_calls(self):
30+
# GH-93252: stuff blows up if we don't pop the new frame after
31+
# recovering from failed calls:
32+
def f():
33+
pass
34+
for _ in range(1000):
35+
try:
36+
f(None)
37+
except TypeError:
38+
pass
39+
# BOOM!
40+
2941

3042
@cpython_only
3143
class CFunctionCallsErrorMessages(unittest.TestCase):

0 commit comments

Comments
 (0)