tests/run-tests.py
branchstable
changeset 931 b56e95db7ac5
parent 930 730303014491
child 932 eb562ea207c3
equal deleted inserted replaced
930:730303014491 931:b56e95db7ac5
   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: