summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-05-19 10:43:16 (GMT)
committerGitHub <noreply@github.com>2022-05-19 10:43:16 (GMT)
commit137fd3d88aa46669f5717734e823f4c594ab2843 (patch)
treea527865e1f3729ef3d7c69a43d08072d8d837d9c /Lib/test/test_compile.py
parente48ac9c1003c3816198cbfb6132a995150f9b048 (diff)
downloadcpython-137fd3d88aa46669f5717734e823f4c594ab2843.zip
cpython-137fd3d88aa46669f5717734e823f4c594ab2843.tar.gz
cpython-137fd3d88aa46669f5717734e823f4c594ab2843.tar.bz2
gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)
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):