diff options
| author | Jeff Epler <jepler@gmail.com> | 2025-07-15 18:43:04 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-09-28 23:23:52 +1000 |
| commit | e35ac67421f71c430ce7a0b26532b048aa4528cd (patch) | |
| tree | 24e65b1572f44ae56ae57449315dc7d466222fcb | |
| parent | fca5bbf664220599c7ed82f276f10996249fe8e5 (diff) | |
tests/stress/fun_call_limit.py: Allow to run with OBJ_REPR_B.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
| -rw-r--r-- | tests/stress/fun_call_limit.py | 10 | ||||
| -rw-r--r-- | tests/stress/fun_call_limit.py.exp | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/stress/fun_call_limit.py b/tests/stress/fun_call_limit.py index b802aadd5..69f8aa5ae 100644 --- a/tests/stress/fun_call_limit.py +++ b/tests/stress/fun_call_limit.py @@ -16,14 +16,16 @@ def test(n): # If the port has at least 32-bits then this test should pass. -print(test(29)) +print(test(28)) # This test should fail on all ports (overflows a small int). print(test(70)) -# Check that there is a correct transition to the limit of too many args before *args. +# 28 is the biggest number that will pass on a 32-bit port using object +# representation B, which has 1<<28 still fitting in a positive small int. reached_limit = False -for i in range(30, 70): +any_test_succeeded = False +for i in range(28, 70): result = test(i) if reached_limit: if result != "SyntaxError": @@ -34,3 +36,5 @@ for i in range(30, 70): else: if result != i + 4: print("FAIL") + any_test_succeeded = True +assert any_test_succeeded # At least one iteration must have passed diff --git a/tests/stress/fun_call_limit.py.exp b/tests/stress/fun_call_limit.py.exp index 53d2b2804..491abbfa8 100644 --- a/tests/stress/fun_call_limit.py.exp +++ b/tests/stress/fun_call_limit.py.exp @@ -1,2 +1,2 @@ -33 +32 SyntaxError |
