summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-09-28 14:37:29 +1000
committerDamien George <damien@micropython.org>2023-09-29 11:44:20 +1000
commit52f76cf4fc1287b000e510a8ed50297bbdb4d4de (patch)
tree62928c6affd2d91b76a4d37fcf8f6f706ec62a16
parent5dbd6fc70581e0264dbfc62a4313dca737124b5c (diff)
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>
-rw-r--r--tests/stress/bytecode_limit.py2
-rw-r--r--tests/stress/bytecode_limit.py.exp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/stress/bytecode_limit.py b/tests/stress/bytecode_limit.py
index 8cca413cf..ad090637f 100644
--- a/tests/stress/bytecode_limit.py
+++ b/tests/stress/bytecode_limit.py
@@ -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:
diff --git a/tests/stress/bytecode_limit.py.exp b/tests/stress/bytecode_limit.py.exp
index 74ab06c09..1d892250b 100644
--- a/tests/stress/bytecode_limit.py.exp
+++ b/tests/stress/bytecode_limit.py.exp
@@ -1,5 +1,5 @@
-cond false
-cond false
RuntimeError
RuntimeError
+cond false
+cond false
[123]