mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
gh-116303: Skip tests if C recursion limit is unavailable (GH-117368)
The test suite fetches the C recursion limit from the _testcapi extension module. Test extension modules can be disabled using the --disable-test-modules configure option.
This commit is contained in:
parent
9a12f5d1c1
commit
ca62ffd1a5
14 changed files with 32 additions and 35 deletions
|
@ -1867,7 +1867,7 @@ class TestLRU:
|
|||
return fib(n-1) + fib(n-2)
|
||||
|
||||
if not support.Py_DEBUG:
|
||||
depth = support.Py_C_RECURSION_LIMIT*2//7
|
||||
depth = support.get_c_recursion_limit()*2//7
|
||||
with support.infinite_recursion():
|
||||
fib(depth)
|
||||
if self.module == c_functools:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue