##// END OF EJS Templates
run-tests: pre instantiate pygments objects...
Jun Wu -
r33581:20436925 stable
parent child Browse files
Show More
@@ -96,6 +96,8 b" if os.name != 'nt':"
96 import pygments.lexers as lexers
96 import pygments.lexers as lexers
97 import pygments.formatters as formatters
97 import pygments.formatters as formatters
98 pygmentspresent = True
98 pygmentspresent = True
99 difflexer = lexers.DiffLexer()
100 terminal256formatter = formatters.Terminal256Formatter()
99 except ImportError:
101 except ImportError:
100 pass
102 pass
101
103
@@ -1651,10 +1653,9 b' class TestResult(unittest._TextTestResul'
1651 self.stream.write('\n')
1653 self.stream.write('\n')
1652 for line in lines:
1654 for line in lines:
1653 if self.color:
1655 if self.color:
1654 line = pygments.highlight(
1656 line = pygments.highlight(line,
1655 line,
1657 difflexer,
1656 lexers.DiffLexer(),
1658 terminal256formatter)
1657 formatters.Terminal256Formatter())
1658 if PYTHON3:
1659 if PYTHON3:
1659 self.stream.flush()
1660 self.stream.flush()
1660 self.stream.buffer.write(line)
1661 self.stream.buffer.write(line)
General Comments 0
You need to be logged in to leave comments. Login now