8000 tests/misc/recursive_iternext: Provide more fine-grained selection of N. · lapsule/micropython@7d60a97 · GitHub 65FA
[go: up one dir, main page]

Skip to content

Commit 7d60a97

Browse files
committed
tests/misc/recursive_iternext: Provide more fine-grained selection of N.
To work on a variety of ports the selection of N is very specific.
1 parent 3f6ca4b commit 7d60a97

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/misc/recursive_iternext.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# This tests that recursion with iternext doesn't lead to segfault.
22

3+
# We need to pick an N that is large enough to hit the recursion
4+
# limit, but not too large that we run out of heap memory.
35
try:
4-
[0] * 10000
6+
# large stack/heap, eg unix
7+
[0] * 80000
58
N = 2000
69
except:
7-
N = 100
10+
try:
11+
# medium, eg pyboard
12+
[0] * 10000
13+
N = 1000
14+
except:
15+
# small, eg esp8266
16+
N = 100
817

918
try:
1019
x = (1, 2)

0 commit comments

Comments
 (0)
0