8000 Tweak some more thresholds and tests · python/cpython@495c4ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 495c4ea

Browse files
committed
Tweak some more thresholds and tests
1 parent 47c50aa commit 495c4ea

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Lib/test/test_call.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,10 +1064,10 @@ def c_py_recurse(m):
10641064
recurse(90_000)
10651065
with self.assertRaises(RecursionError):
10661066
recurse(101_000)
1067-
c_recurse(100)
1067+
c_recurse(50)
10681068
with self.assertRaises(RecursionError):
10691069
c_recurse(90_000)
1070-
c_py_recurse(90)
1070+
c_py_recurse(50)
10711071
with self.assertRaises(RecursionError):
10721072
c_py_recurse(100_000)
10731073

Lib/test/test_fstring.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ def test_mismatched_parens(self):
628628
["f'{a(4}'",
629629
])
630630
self.assertRaises(SyntaxError, eval, "f'{" + "("*100 + "}'")
631-
self.assertRaises(MemoryError, eval, "f'{" + "("*500 + "}'")
632631

633632
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
634633
def test_fstring_nested_too_deeply(self):

Lib/test/test_functools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,8 +2077,10 @@ def fib(n):
20772077
return n
20782078
return fib(n-1) + fib(n-2)
20792079

2080-
with support.infinite_recursion():
2080+
try:
20812081
fib(100)
2082+
except RecursionError:
2083+
fib(50)
20822084
if self.module == c_functools:
20832085
fib.cache_clear()
20842086
with support.infinite_recursion():

Tools/peg_generator/pegen/c_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# define MAXSTACK 4000
4545
# endif
4646
#else
47-
# define MAXSTACK 6000
47+
# define MAXSTACK 4000
4848
#endif
4949
5050
"""

0 commit comments

Comments
 (0)
0