diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -88,7 +88,6 @@ osenvironb = getattr(os, 'environb', os.environ) processlock = threading.Lock() -with_color = False pygmentspresent = False # ANSI color is unsupported prior to Windows 10 if os.name != 'nt': @@ -96,7 +95,6 @@ import pygments import pygments.lexers as lexers import pygments.formatters as formatters - with_color = True pygmentspresent = True except ImportError: pass @@ -414,7 +412,7 @@ '(use --with-chg instead)') if options.color == 'auto': - options.color = with_color + options.color = pygmentspresent if not sys.stderr.isatty(): # check if the terminal is capable options.color = False elif options.color == 'never': @@ -422,7 +420,7 @@ else: # 'always', for testing purposes options.color = pygmentspresent if not pygmentspresent: - sys.stderr.write('warning: --color=always ignored because' + sys.stderr.write('warning: --color=always ignored because ' 'pygments is not installed\n') global useipv6