mirror of
https://github.com/python/cpython.git
synced 2025-08-10 20:08:47 +00:00
[3.12] gh-108851: Fix tomllib recursion tests (GH-108853) (#109012)
gh-108851: Fix tomllib recursion tests (GH-108853)
* Add get_recursion_available() and get_recursion_depth() functions
to the test.support module.
* Change infinite_recursion() default max_depth from 75 to 100.
* Fix test_tomllib recursion tests for WASI buildbots: reduce the
recursion limit and compute the maximum nested array/dict depending
on the current available recursion limit.
* test.pythoninfo logs sys.getrecursionlimit().
* Enhance test_sys tests on sys.getrecursionlimit()
and sys.setrecursionlimit().
(cherry picked from commit 8ff1142578
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
038b0a9cb0
commit
55d7e8fef1
7 changed files with 176 additions and 40 deletions
|
@ -112,6 +112,7 @@ def collect_sys(info_add):
|
|||
|
||||
call_func(info_add, 'sys.androidapilevel', sys, 'getandroidapilevel')
|
||||
call_func(info_add, 'sys.windowsversion', sys, 'getwindowsversion')
|
||||
call_func(info_add, 'sys.getrecursionlimit', sys, 'getrecursionlimit')
|
||||
|
||||
encoding = sys.getfilesystemencoding()
|
||||
if hasattr(sys, 'getfilesystemencodeerrors'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue