[PATCH 6 of 8] run-tests: explicitly declare the list of dropped environment variable

Boris Feld boris.feld at octobus.net
Fri Nov 2 05:31:56 EDT 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1539906736 -7200
#      Fri Oct 19 01:52:16 2018 +0200
# Node ID b95aef679522bd42e7041373b5af9ca4ab9ce004
# Parent  063a0cb2cb31f0071c764035953fb8c3bc9bbdbc
# EXP-Topic run-tests
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b95aef679522
run-tests: explicitly declare the list of dropped environment variable

It will make the list clearer and more maintainable.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1110,9 +1110,23 @@ class Test(unittest.TestCase):
         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]
 


More information about the Mercurial-devel mailing list