mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.14] gh-135074: Fix exception messages in test.support module (GH-135076) (GH-135129)
(cherry picked from commit bc00ce941e)
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
This commit is contained in:
parent
afe244d694
commit
5008317dcd
1 changed files with 2 additions and 2 deletions
|
|
@ -1084,7 +1084,7 @@ def set_memlimit(limit: str) -> None:
|
|||
global real_max_memuse
|
||||
memlimit = _parse_memlimit(limit)
|
||||
if memlimit < _2G - 1:
|
||||
raise ValueError('Memory limit {limit!r} too low to be useful')
|
||||
raise ValueError(f'Memory limit {limit!r} too low to be useful')
|
||||
|
||||
real_max_memuse = memlimit
|
||||
memlimit = min(memlimit, MAX_Py_ssize_t)
|
||||
|
|
@ -2359,7 +2359,7 @@ def infinite_recursion(max_depth=None):
|
|||
# very deep recursion.
|
||||
max_depth = 20_000
|
||||
elif max_depth < 3:
|
||||
raise ValueError("max_depth must be at least 3, got {max_depth}")
|
||||
raise ValueError(f"max_depth must be at least 3, got {max_depth}")
|
||||
depth = get_recursion_depth()
|
||||
depth = max(depth - 1, 1) # Ignore infinite_recursion() frame.
|
||||
limit = depth + max_depth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue