Skip to content

Commit bc00ce9

Browse files
authored
gh-135074: Fix exception messages in test.support module (GH-135076)
1 parent 5b38654 commit bc00ce9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/support/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ def set_memlimit(limit: str) -> None:
10841084
global real_max_memuse
10851085
memlimit = _parse_memlimit(limit)
10861086
if memlimit < _2G - 1:
1087-
raise ValueError('Memory limit {limit!r} too low to be useful')
1087+
raise ValueError(f'Memory limit {limit!r} too low to be useful')
10881088

10891089
real_max_memuse = memlimit
10901090
memlimit = min(memlimit, MAX_Py_ssize_t)
@@ -2358,7 +2358,7 @@ def infinite_recursion(max_depth=None):
23582358
# very deep recursion.
23592359
max_depth = 20_000
23602360
elif max_depth < 3:
2361-
raise ValueError("max_depth must be at least 3, got {max_depth}")
2361+
raise ValueError(f"max_depth must be at least 3, got {max_depth}")
23622362
depth = get_recursion_depth()
23632363
depth = max(depth - 1, 1) # Ignore infinite_recursion() frame.
23642364
limit = depth + max_depth

0 commit comments

Comments
 (0)