summaryrefslogtreecommitdiff
path: root/tests/run/knuth_man_or_boy_test.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/knuth_man_or_boy_test.pyx')
-rw-r--r--tests/run/knuth_man_or_boy_test.pyx6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/run/knuth_man_or_boy_test.pyx b/tests/run/knuth_man_or_boy_test.pyx
index 068cec524..d2b5c8825 100644
--- a/tests/run/knuth_man_or_boy_test.pyx
+++ b/tests/run/knuth_man_or_boy_test.pyx
@@ -46,9 +46,13 @@ def compute(val):
def a(in_k, x1, x2, x3, x4, x5):
"""
>>> import sys
- >>> sys.setrecursionlimit(1350)
+ >>> old_limit = sys.getrecursionlimit()
+ >>> sys.setrecursionlimit(1350 if not getattr(sys, 'pypy_version_info', None) else 2700)
+
>>> a(10, 1, -1, -1, 1, 0)
-67
+
+ >>> sys.setrecursionlimit(old_limit)
"""
k = [in_k]
def b():