[3.14] Do not break long test names in the regrtest output (GH-155714) (GH-155723)

serhiy-storchaka <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/65fa1a0f13e7e91fb7d7520ae8b89c93c9cc3460
commit: 65fa1a0f13e7e91fb7d7520ae8b89c93c9cc3460
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-08-13T15:36:09Z
summary:

[3.14] Do not break long test names in the regrtest output (GH-155714) (GH-155723)

printlist() used textwrap.fill(), which breaks words longer than the
line width.
(cherry picked from commit ceb351884a625de7c8cf70f3d0def5742ce85c11)

Co-authored-by: Serhiy Storchaka <[email protected]>

files:
M Lib/test/libregrtest/utils.py

diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py
index 15caba75acfa3da..7da50c79d59e4b7 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)
 
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.