tests/run-tests.py
changeset 33552 754569f5e999
parent 33500 9c6e64911de0
child 33561 2893face0af5
--- a/tests/run-tests.py	Sat Jul 15 13:21:23 2017 -0700
+++ b/tests/run-tests.py	Sat Jul 15 02:17:05 2017 +0530
@@ -89,7 +89,7 @@
 processlock = threading.Lock()
 
 with_color = False
-
+pygmentspresent = False
 # ANSI color is unsupported prior to Windows 10
 if os.name != 'nt':
     try: # is pygments installed
@@ -97,6 +97,7 @@
         import pygments.lexers as lexers
         import pygments.formatters as formatters
         with_color = True
+        pygmentspresent = True
     except ImportError:
         pass
 
@@ -1650,7 +1651,7 @@
                 else:
                     self.stream.write('\n')
                     for line in lines:
-                        if with_color:
+                        if with_color and pygmentspresent:
                             line = pygments.highlight(
                                     line,
                                     lexers.DiffLexer(),