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: