From 87aa6e57e3860265591f336d86e95b428a8c01fa Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 13 Aug 2026 18:08:24 +0300 Subject: [PATCH] Do not break long test names in the regrtest output (GH-155714) printlist() used textwrap.fill(), which breaks words longer than the line width. (cherry picked from commit ceb351884a625de7c8cf70f3d0def5742ce85c11) Co-authored-by: Serhiy Storchaka --- Lib/test/libregrtest/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py index 15caba75acfa3d..7da50c79d59e4b 100644 --- a/Lib/test/libregrtest/utils.py +++ b/Lib/test/libregrtest/utils.py @@ -118,7 +118,8 @@ def printlist(x, width=70, indent=4, file=None): blanks = ' ' * indent # Print the sorted list: 'x' may be a '--random' list or a set() print(textwrap.fill(' '.join(str(elt) for elt in sorted(x)), width, - initial_indent=blanks, subsequent_indent=blanks), + initial_indent=blanks, subsequent_indent=blanks, + break_long_words=False, break_on_hyphens=False), file=file)