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>
pull/12536/head
Jim Mussared 2023-09-28 14:37:29 +10:00 zatwierdzone przez Damien George
rodzic 5dbd6fc705
commit 52f76cf4fc
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

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