Skip to content

Commit e35ac67

Browse files
jeplerdpgeorge
authored andcommitted
tests/stress/fun_call_limit.py: Allow to run with OBJ_REPR_B.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
1 parent fca5bbf commit e35ac67

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

tests/stress/fun_call_limit.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ def test(n):
1616

1717

1818
# If the port has at least 32-bits then this test should pass.
19-
print(test(29))
19+
print(test(28))
2020

2121
# This test should fail on all ports (overflows a small int).
2222
print(test(70))
2323

24-
# Check that there is a correct transition to the limit of too many args before *args.
24+
# 28 is the biggest number that will pass on a 32-bit port using object
25+
# representation B, which has 1<<28 still fitting in a positive small int.
2526
reached_limit = False
26-
for i in range(30, 70):
27+
any_test_succeeded = False
28+
for i in range(28, 70):
2729
result = test(i)
2830
if reached_limit:
2931
if result != "SyntaxError":
@@ -34,3 +36,5 @@ def test(n):
3436
else:
3537
if result != i + 4:
3638
print("FAIL")
39+
any_test_succeeded = True
40+
assert any_test_succeeded # At least one iteration must have passed

tests/stress/fun_call_limit.py.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
33
1+
32
22
SyntaxError

0 commit comments

Comments
 (0)