summaryrefslogtreecommitdiff
path: root/tests/stress/bytecode_limit.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stress/bytecode_limit.py')
-rw-r--r--tests/stress/bytecode_limit.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/stress/bytecode_limit.py b/tests/stress/bytecode_limit.py
index ad090637f..948d7668d 100644
--- a/tests/stress/bytecode_limit.py
+++ b/tests/stress/bytecode_limit.py
@@ -3,14 +3,18 @@
body = " with f()()() as a:\n try:\n f()()()\n except Exception:\n pass\n"
# Test overflow of jump offset.
+# Print results at the end in case an intermediate value of n fails with MemoryError.
+results = []
for n in (433, 432, 431, 430):
try:
exec("cond = 0\nif cond:\n" + body * n + "else:\n print('cond false')\n")
+ results.append((n, "ok"))
except MemoryError:
print("SKIP")
raise SystemExit
except RuntimeError:
- print("RuntimeError")
+ results.append((n, "RuntimeError"))
+print(results)
# Test changing size of code info (source line/bytecode mapping) due to changing
# bytecode size in the final passes. This test is very specific to how the