changeset 40469:f8154ddaaed3

run-tests: explicitly declare the list of dropped environment variable It will make the list clearer and more maintainable.
author Boris Feld <boris.feld@octobus.net>
date Fri, 19 Oct 2018 01:52:16 +0200
parents 1f0c5c9a1765
children d6b6f1b441cf
files tests/run-tests.py
diffstat 1 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Thu Nov 01 14:29:14 2018 +0100
+++ b/tests/run-tests.py	Fri Oct 19 01:52:16 2018 +0200
@@ -1110,9 +1110,23 @@
         env['COLUMNS'] = '80'
         env['TERM'] = 'xterm'
 
-        for k in ('HG HGPROF CDPATH GREP_OPTIONS http_proxy no_proxy ' +
-                  'HGPLAIN HGPLAINEXCEPT EDITOR VISUAL PAGER ' +
-                  'NO_PROXY CHGDEBUG').split():
+        dropped = [
+            'CDPATH',
+            'CHGDEBUG',
+            'EDITOR',
+            'GREP_OPTIONS',
+            'HG',
+            'HGPLAIN',
+            'HGPLAINEXCEPT',
+            'HGPROF',
+            'http_proxy',
+            'no_proxy',
+            'NO_PROXY',
+            'PAGER',
+            'VISUAL',
+        ]
+
+        for k in dropped:
             if k in env:
                 del env[k]