Skip to content

Commit 52f76cf

Browse files
jimmodpgeorge
authored andcommitted
tests/stress/bytecode_limit.py: Reverse order of cases.
The PYBD_SF2 is right on the limit of being able to run this test and so it succeeds the first two cases and fails the next two with MemoryError. This causes it to SKIP, but that only works if it's the first thing printed. So reverse the order of the tests so it fails on the biggest one first. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent 5dbd6fc commit 52f76cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/stress/bytecode_limit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
body = " with f()()() as a:\n try:\n f()()()\n except Exception:\n pass\n"
44

55
# Test overflow of jump offset.
6-
for n in (430, 431, 432, 433):
6+
for n in (433, 432, 431, 430):
77
try:
88
exec("cond = 0\nif cond:\n" + body * n + "else:\n print('cond false')\n")
99
except MemoryError:

tests/stress/bytecode_limit.py.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
cond false
2-
cond false
31
RuntimeError
42
RuntimeError
3+
cond false
4+
cond false
55
[123]

0 commit comments

Comments
 (0)