mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +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
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue