Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy