summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 487a4fa..d435724 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -109,7 +109,9 @@ class TestSpecifics(unittest.TestCase):
self.assertEqual(d['z'], 12)
def test_extended_arg(self):
- longexpr = 'x = x or ' + '-x' * 2500
+ # default: 1000 * 2.5 = 2500 repetitions
+ repeat = int(sys.getrecursionlimit() * 2.5)
+ longexpr = 'x = x or ' + '-x' * repeat
g = {}
code = '''
def f(x):