Mercurial > hg
comparison tests/run-tests.py @ 25158:3906b9783cd9
run-tests: prefer PYTHON3 constant to many version_info checks (issue4668)
We only support Python 2.6, 2.7, and 3.5 here, so we can simplify the
code and improve the warning.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 17 May 2015 21:17:13 -0400 |
parents | a8d22895a575 |
children | 138dc8381049 |
comparison
equal
deleted
inserted
replaced
25157:a8d22895a575 | 25158:3906b9783cd9 |
---|---|
301 if options.timeout != defaults['timeout']: | 301 if options.timeout != defaults['timeout']: |
302 sys.stderr.write( | 302 sys.stderr.write( |
303 'warning: --timeout option ignored with --debug\n') | 303 'warning: --timeout option ignored with --debug\n') |
304 options.timeout = 0 | 304 options.timeout = 0 |
305 if options.py3k_warnings: | 305 if options.py3k_warnings: |
306 if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0): | 306 if PYTHON3: |
307 parser.error('--py3k-warnings can only be used on Python 2.6+') | 307 parser.error( |
308 '--py3k-warnings can only be used on Python 2.6 and 2.7') | |
308 if options.blacklist: | 309 if options.blacklist: |
309 options.blacklist = parselistfiles(options.blacklist, 'blacklist') | 310 options.blacklist = parselistfiles(options.blacklist, 'blacklist') |
310 if options.whitelist: | 311 if options.whitelist: |
311 options.whitelisted = parselistfiles(options.whitelist, 'whitelist') | 312 options.whitelisted = parselistfiles(options.whitelist, 'whitelist') |
312 else: | 313 else: |