Mercurial > hg
comparison tests/run-tests.py @ 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 | 8783710b1d58 |
children | d6b6f1b441cf |
comparison
equal
deleted
inserted
replaced
40468:1f0c5c9a1765 | 40469:f8154ddaaed3 |
---|---|
1108 env['TZ'] = 'GMT' | 1108 env['TZ'] = 'GMT' |
1109 env["EMAIL"] = "Foo Bar <foo.bar@example.com>" | 1109 env["EMAIL"] = "Foo Bar <foo.bar@example.com>" |
1110 env['COLUMNS'] = '80' | 1110 env['COLUMNS'] = '80' |
1111 env['TERM'] = 'xterm' | 1111 env['TERM'] = 'xterm' |
1112 | 1112 |
1113 for k in ('HG HGPROF CDPATH GREP_OPTIONS http_proxy no_proxy ' + | 1113 dropped = [ |
1114 'HGPLAIN HGPLAINEXCEPT EDITOR VISUAL PAGER ' + | 1114 'CDPATH', |
1115 'NO_PROXY CHGDEBUG').split(): | 1115 'CHGDEBUG', |
1116 'EDITOR', | |
1117 'GREP_OPTIONS', | |
1118 'HG', | |
1119 'HGPLAIN', | |
1120 'HGPLAINEXCEPT', | |
1121 'HGPROF', | |
1122 'http_proxy', | |
1123 'no_proxy', | |
1124 'NO_PROXY', | |
1125 'PAGER', | |
1126 'VISUAL', | |
1127 ] | |
1128 | |
1129 for k in dropped: | |
1116 if k in env: | 1130 if k in env: |
1117 del env[k] | 1131 del env[k] |
1118 | 1132 |
1119 # unset env related to hooks | 1133 # unset env related to hooks |
1120 for k in list(env): | 1134 for k in list(env): |