# HG changeset patch # User Martin Geisler # Date 1304618623 -7200 # Node ID b56e95db7ac55fe9ce4b94d6915812cf79bf542e # Parent 7303030144911e80bdc638e5687d0a86aaa0bec7 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. [ original upstream message ] diff -r 730303014491 -r b56e95db7ac5 tests/run-tests.py --- a/tests/run-tests.py Wed May 04 10:39:10 2011 -0500 +++ 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()