tests/run-tests.py
changeset 14201 57e04ded3da4
parent 14192 38e387a64f58
child 14202 b68a41420397
equal deleted inserted replaced
14200:dc733eec9169 14201:57e04ded3da4
   166     parser.add_option("-3", "--py3k-warnings", action="store_true",
   166     parser.add_option("-3", "--py3k-warnings", action="store_true",
   167         help="enable Py3k warnings on Python 2.6+")
   167         help="enable Py3k warnings on Python 2.6+")
   168     parser.add_option('--extra-config-opt', action="append",
   168     parser.add_option('--extra-config-opt', action="append",
   169                       help='set the given config opt in the test hgrc')
   169                       help='set the given config opt in the test hgrc')
   170 
   170 
   171     for option, default in defaults.items():
   171     for option, (envvar, default) in defaults.items():
   172         defaults[option] = int(os.environ.get(*default))
   172         defaults[option] = type(default)(os.environ.get(envvar, default))
   173     parser.set_defaults(**defaults)
   173     parser.set_defaults(**defaults)
   174     (options, args) = parser.parse_args()
   174     (options, args) = parser.parse_args()
   175 
   175 
   176     # jython is always pure
   176     # jython is always pure
   177     if 'java' in sys.platform or '__pypy__' in sys.modules:
   177     if 'java' in sys.platform or '__pypy__' in sys.modules: