diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-08 14:45:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 14:45:25 +0200 |
commit | ca62ffd1a5ef41401abceddfd171c76c68825a35 (patch) | |
tree | bc5ece1694f0d99642446844f74be11ebd7e53b0 /Lib/test/test_dictviews.py | |
parent | 9a12f5d1c19dee1f89684be776680aeaf117be5b (diff) | |
download | cpython-ca62ffd1a5ef41401abceddfd171c76c68825a35.tar.gz cpython-ca62ffd1a5ef41401abceddfd171c76c68825a35.zip |
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_dictviews.py')
-rw-r--r-- | Lib/test/test_dictviews.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py index cad568b6ac4..d9881611c19 100644 --- a/Lib/test/test_dictviews.py +++ b/Lib/test/test_dictviews.py @@ -2,7 +2,7 @@ import collections.abc import copy import pickle import unittest -from test.support import Py_C_RECURSION_LIMIT +from test.support import get_c_recursion_limit class DictSetTest(unittest.TestCase): @@ -279,7 +279,7 @@ class DictSetTest(unittest.TestCase): def test_deeply_nested_repr(self): d = {} - for i in range(Py_C_RECURSION_LIMIT//2 + 100): + for i in range(get_c_recursion_limit()//2 + 100): d = {42: d.values()} self.assertRaises(RecursionError, repr, d) |