Mercurial > hg
changeset 14201:57e04ded3da4
run-tests: use type of default to convert environment variable
Before, defaults could only be integers, they can now also be strings,
floats and what have you.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 05 May 2011 20:03:43 +0200 |
parents | dc733eec9169 |
children | b68a41420397 |
files | tests/run-tests.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Thu May 05 19:29:02 2011 +0200 +++ b/tests/run-tests.py Thu May 05 20:03:43 2011 +0200 @@ -168,8 +168,8 @@ parser.add_option('--extra-config-opt', action="append", help='set the given config opt in the test hgrc') - for option, default in defaults.items(): - defaults[option] = int(os.environ.get(*default)) + for option, (envvar, default) in defaults.items(): + defaults[option] = type(default)(os.environ.get(envvar, default)) parser.set_defaults(**defaults) (options, args) = parser.parse_args()