# HG changeset patch # User Martin von Zweigbergk # Date 2017-07-17 23:27:13 # Node ID d9677e2ed16ae1fda2e7a2568451935ec696f295 # Parent 97070cbf081380b396f542ec4d87641f990d92d8 run-tests: warn if --color=always and no pygments installed Differential Revision: https://phab.mercurial-scm.org/D117 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -413,6 +413,10 @@ def parseargs(args, parser): 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')