diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-02-13 15:50:22 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-07 15:30:02 +0700 |
commit | b86c20676e4a014f8585fa07512fe89eb66da997 (patch) | |
tree | e1ffeab6a0967e526fc1d188fc2fd089bba7e6e5 | |
parent | db984b73f3673b525ff7c1e1525bdc146d518dca (diff) | |
download | micropython-b86c20676e4a014f8585fa07512fe89eb66da997.tar.gz micropython-b86c20676e4a014f8585fa07512fe89eb66da997.zip |
tests/recursive_iternext.py: Make low-heap friendly.
-rw-r--r-- | tests/misc/recursive_iternext.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/misc/recursive_iternext.py b/tests/misc/recursive_iternext.py index ac3a17e93b..2723d3c10c 100644 --- a/tests/misc/recursive_iternext.py +++ b/tests/misc/recursive_iternext.py @@ -1,8 +1,14 @@ # This tests that recursion with iternext doesn't lead to segfault. try: + [0] * 10000 + N = 1000 +except: + N = 100 + +try: x = (1, 2) - for i in range(1000): + for i in range(N): x = enumerate(x) tuple(x) except RuntimeError: @@ -10,7 +16,7 @@ except RuntimeError: try: x = (1, 2) - for i in range(1000): + for i in range(N): x = filter(None, x) tuple(x) except RuntimeError: @@ -18,7 +24,7 @@ except RuntimeError: try: x = (1, 2) - for i in range(1000): + for i in range(N): x = map(max, x, ()) tuple(x) except RuntimeError: @@ -26,7 +32,7 @@ except RuntimeError: try: x = (1, 2) - for i in range(1000): + for i in range(N): x = zip(x) tuple(x) except RuntimeError: |