changeset 33568:a2c35146596b

run-tests: remove unnecessary 'with_color' variable Its value is always the same as that of 'pygmentspresent'. Differential Revision: https://phab.mercurial-scm.org/D118
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 17 Jul 2017 16:32:10 -0700
parents d9677e2ed16a
children d341677d667d
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Jul 17 16:27:13 2017 -0700
+++ b/tests/run-tests.py	Mon Jul 17 16:32:10 2017 -0700
@@ -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
@@ -1569,7 +1567,7 @@
         self.faildata = {}
 
         if options.color == 'auto':
-            self.color = with_color and self.stream.isatty()
+            self.color = pygmentspresent and self.stream.isatty()
         elif options.color == 'never':
             self.color = False
         else: # 'always', for testing purposes