From 52f76cf4fc1287b000e510a8ed50297bbdb4d4de Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Thu, 28 Sep 2023 14:37:29 +1000 Subject: [PATCH] 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 --- tests/stress/bytecode_limit.py | 2 +- tests/stress/bytecode_limit.py.exp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/stress/bytecode_limit.py b/tests/stress/bytecode_limit.py index 8cca413cf2..ad090637f6 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 74ab06c09b..1d892250b0 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]