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_exception_group.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_exception_group.py')
-rw-r--r-- | Lib/test/test_exception_group.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py index 2012267..b4fc290 100644 --- a/Lib/test/test_exception_group.py +++ b/Lib/test/test_exception_group.py @@ -1,7 +1,7 @@ import collections.abc import types import unittest -from test.support import Py_C_RECURSION_LIMIT +from test.support import get_c_recursion_limit class TestExceptionGroupTypeHierarchy(unittest.TestCase): def test_exception_group_types(self): @@ -460,7 +460,7 @@ class ExceptionGroupSplitTests(ExceptionGroupTestBase): class DeepRecursionInSplitAndSubgroup(unittest.TestCase): def make_deep_eg(self): e = TypeError(1) - for i in range(Py_C_RECURSION_LIMIT + 1): + for i in range(get_c_recursion_limit() + 1): e = ExceptionGroup('eg', [e]) return e |