run-tests: explicitly declare the list of dropped environment variable
authorBoris Feld <boris.feld@octobus.net>
Fri, 19 Oct 2018 01:52:16 +0200
changeset 40469 f8154ddaaed3
parent 40468 1f0c5c9a1765
child 40470 d6b6f1b441cf
run-tests: explicitly declare the list of dropped environment variable It will make the list clearer and more maintainable.
tests/run-tests.py
--- 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]