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 <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2023-09-28 14:37:29 +10:00 committed by Damien George
parent 5dbd6fc705
commit 52f76cf4fc
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
body = " with f()()() as a:\n try:\n f()()()\n except Exception:\n pass\n"
# Test overflow of jump offset.
for n in (430, 431, 432, 433):
for n in (433, 432, 431, 430):
try:
exec("cond = 0\nif cond:\n" + body * n + "else:\n print('cond false')\n")
except MemoryError:

View File

@ -1,5 +1,5 @@
cond false
cond false
RuntimeError
RuntimeError
cond false
cond false
[123]