diff options
author | Victor Stinner <vstinner@python.org> | 2023-09-06 17:34:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 17:34:31 +0200 |
commit | 8ff11425783806f8cb78e99f667546b1f7f3428e (patch) | |
tree | 0c4d2006d833d74a59a809fd2447fc6a91ceabd7 /Lib/test/pythoninfo.py | |
parent | 2cd170db40ffba357848672ff3d2f8c1e0e74f2c (diff) | |
download | cpython-8ff11425783806f8cb78e99f667546b1f7f3428e.tar.gz cpython-8ff11425783806f8cb78e99f667546b1f7f3428e.zip |
gh-108851: Fix tomllib recursion tests (#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().
Diffstat (limited to 'Lib/test/pythoninfo.py')
-rw-r--r-- | Lib/test/pythoninfo.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 53af21db075..46522b50dd1 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -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'): |