diff options
author | Mark Shannon <mark@hotpy.org> | 2024-01-16 09:32:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 09:32:01 (GMT) |
commit | 17b73ab99ef12f89d41acec7500a244e68b1aaa4 (patch) | |
tree | bcde8fca4dc4dae4f9ed5369a4ea23bb825f15bb /Lib/test/test_functools.py | |
parent | 6c502ba809ff662a5eebf8c6778dec6bd28918fb (diff) | |
download | cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.zip cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.tar.gz cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.tar.bz2 |
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 0ef45d3..7c66b90 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -1875,8 +1875,14 @@ class TestLRU: return fib(n-1) + fib(n-2) if not support.Py_DEBUG: + depth = support.Py_C_RECURSION_LIMIT*2//7 with support.infinite_recursion(): - fib(2500) + fib(depth) + if self.module == c_functools: + fib.cache_clear() + with support.infinite_recursion(): + with self.assertRaises(RecursionError): + fib(10000) @py_functools.lru_cache() |