run-tests: warn if --color=always and no pygments installed
Differential Revision: https://phab.mercurial-scm.org/D117
--- a/tests/run-tests.py Mon Jul 17 16:28:42 2017 -0700
+++ b/tests/run-tests.py Mon Jul 17 16:27:13 2017 -0700
@@ -413,6 +413,10 @@
parser.error('--chg does not work when --with-hg is specified '
'(use --with-chg instead)')
+ if options.color == 'always' and not pygmentspresent:
+ sys.stderr.write('warning: --color=always ignored because '
+ 'pygments is not installed\n')
+
global useipv6
if options.ipv6:
useipv6 = checksocketfamily('AF_INET6')