diff options
author | Damien George <damien.p.george@gmail.com> | 2016-06-03 15:09:45 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-06-03 15:09:45 +0100 |
commit | 7d60a9791455358890467be295607b839a9140ae (patch) | |
tree | 3fae929acd0a9c02afffb7fc922ce593889272cd /tests/misc/recursive_iternext.py | |
parent | 3f6ca4b22ced848a4b849610a8bce0410c2091cc (diff) |
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.
Diffstat (limited to 'tests/misc/recursive_iternext.py')
-rw-r--r-- | tests/misc/recursive_iternext.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/misc/recursive_iternext.py b/tests/misc/recursive_iternext.py index 11c49d1f8..376c45b3c 100644 --- a/tests/misc/recursive_iternext.py +++ b/tests/misc/recursive_iternext.py @@ -1,10 +1,19 @@ # This tests that recursion with iternext doesn't lead to segfault. +# We need to pick an N that is large enough to hit the recursion +# limit, but not too large that we run out of heap memory. try: - [0] * 10000 + # large stack/heap, eg unix + [0] * 80000 N = 2000 except: - N = 100 + try: + # medium, eg pyboard + [0] * 10000 + N = 1000 + except: + # small, eg esp8266 + N = 100 try: x = (1, 2) |