##// END OF EJS Templates
run-tests: disable color in 'auto' mode on Windows if stdout is redirected...
Matt Harbison -
r48090:af4d1a17 default
parent child Browse files
Show More
@@ -2211,7 +2211,13 class TestResult(unittest._TextTestResul
2211 self.faildata = {}
2211 self.faildata = {}
2212
2212
2213 if options.color == 'auto':
2213 if options.color == 'auto':
2214 self.color = pygmentspresent and self.stream.isatty()
2214 isatty = self.stream.isatty()
2215 # For some reason, redirecting stdout on Windows disables the ANSI
2216 # color processing of stderr, which is what is used to print the
2217 # output. Therefore, both must be tty on Windows to enable color.
2218 if os.name == 'nt':
2219 isatty = isatty and sys.stdout.isatty()
2220 self.color = pygmentspresent and isatty
2215 elif options.color == 'never':
2221 elif options.color == 'never':
2216 self.color = False
2222 self.color = False
2217 else: # 'always', for testing purposes
2223 else: # 'always', for testing purposes
General Comments 0
You need to be logged in to leave comments. Login now