summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/script_helper.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-24 06:28:50 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-24 06:28:50 (GMT)
commite495646a9702935ae47f01c4fd06b62328bf11cb (patch)
treedb0c1df83b31682c0bf659d22a21a02062d67c45 /Lib/test/support/script_helper.py
parent37e87e6ec116b0e0e41e9623eec2743c78d96b5c (diff)
downloadcpython-e495646a9702935ae47f01c4fd06b62328bf11cb.zip
cpython-e495646a9702935ae47f01c4fd06b62328bf11cb.tar.gz
cpython-e495646a9702935ae47f01c4fd06b62328bf11cb.tar.bz2
Issue #18300: Set TERM='' by default in assert_python_*
Diffstat (limited to 'Lib/test/support/script_helper.py')
-rw-r--r--Lib/test/support/script_helper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/support/script_helper.py b/Lib/test/support/script_helper.py
index 9c2e9eb..c45d010 100644
--- a/Lib/test/support/script_helper.py
+++ b/Lib/test/support/script_helper.py
@@ -73,6 +73,10 @@ def run_python_until_end(*args, **env_vars):
# Need to preserve the original environment, for in-place testing of
# shared library builds.
env = os.environ.copy()
+ # set TERM='' unless the TERM environment variable is passed explicitly
+ # see issues #11390 and #18300
+ if 'TERM' not in env_vars:
+ env['TERM'] = ''
# But a special flag that can be set to override -- in this case, the
# caller is responsible to pass the full environment.
if env_vars.pop('__cleanenv', None):