changeset 19271:08be9601b464

run-tests: simplify env deletion
author Matt Mackall <mpm@selenic.com>
date Sun, 02 Jun 2013 16:29:20 -0500
parents ac80a1cddf83
children 16df87e25f41
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Jun 02 16:22:51 2013 -0500
+++ b/tests/run-tests.py	Sun Jun 02 16:29:20 2013 -0500
@@ -380,20 +380,15 @@
     env['COLUMNS'] = '80'
     env['TERM'] = 'xterm'
 
-    env['CDPATH'] = ''
-    env['GREP_OPTIONS'] = ''
-    env['http_proxy'] = ''
-    env['no_proxy'] = ''
-    env['NO_PROXY'] = ''
+    for k in ('HG HGPROF CDPATH GREP_OPTIONS http_proxy no_proxy ' +
+              'NO_PROXY').split():
+        if k in env:
+            del env[k]
 
     # unset env related to hooks
     for k in env.keys():
         if k.startswith('HG_'):
             del env[k]
-    if 'HG' in env:
-        del env['HG']
-    if 'HGPROF' in env:
-        del env['HGPROF']
 
     return env