[Python-checkins] cpython: Try workaround for test issues in #21425
antoine.pitrou
python-checkins at python.org
Sun May 11 16:59:22 CEST 2014
http://hg.python.org/cpython/rev/e57718ac8ff8
changeset: 90629:e57718ac8ff8
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun May 11 16:59:16 2014 +0200
summary:
Try workaround for test issues in #21425
files:
Lib/test/script_helper.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py
--- a/Lib/test/script_helper.py
+++ b/Lib/test/script_helper.py
@@ -86,6 +86,14 @@
"""
cmd_line = [sys.executable, '-E']
cmd_line.extend(args)
+ # Under Fedora (?), GNU readline can output junk on stderr when initialized,
+ # depending on the TERM setting. Setting TERM=vt100 is supposed to disable
+ # that. References:
+ # - http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
+ # - http://stackoverflow.com/questions/15760712/python-readline-module-prints-escape-character-during-import
+ # - http://lists.gnu.org/archive/html/bug-readline/2007-08/msg00004.html
+ env = kw.setdefault('env', {})
+ env.setdefault('TERM', 'vt100')
return subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
stdout=stdout, stderr=stderr,
**kw)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list