diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-08 12:45:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 12:45:25 (GMT) |
commit | ca62ffd1a5ef41401abceddfd171c76c68825a35 (patch) | |
tree | bc5ece1694f0d99642446844f74be11ebd7e53b0 /Lib/test/test_functools.py | |
parent | 9a12f5d1c19dee1f89684be776680aeaf117be5b (diff) | |
download | cpython-ca62ffd1a5ef41401abceddfd171c76c68825a35.zip cpython-ca62ffd1a5ef41401abceddfd171c76c68825a35.tar.gz cpython-ca62ffd1a5ef41401abceddfd171c76c68825a35.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r-- | Lib/test/test_functools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 3ba4929..c48c399 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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: |