Show More
@@ -1169,7 +1169,15 b' class TextTestRunner(unittest.TextTestRu' | |||||
1169 | self.stream.writeln('python hash seed: %s' % |
|
1169 | self.stream.writeln('python hash seed: %s' % | |
1170 | os.environ['PYTHONHASHSEED']) |
|
1170 | os.environ['PYTHONHASHSEED']) | |
1171 | if self._runner.options.time: |
|
1171 | if self._runner.options.time: | |
1172 |
self. |
|
1172 | self.printtimes() | |
|
1173 | ||||
|
1174 | def printtimes(self): | |||
|
1175 | self.stream.writeln('# Producing time report') | |||
|
1176 | self._runner.times.sort(key=lambda t: (t[1], t[0]), reverse=True) | |||
|
1177 | cols = '%7.3f %s' | |||
|
1178 | self.stream.writeln('%-7s %s' % ('Time', 'Test')) | |||
|
1179 | for test, timetaken in self._runner.times: | |||
|
1180 | self.stream.writeln(cols % (timetaken, test)) | |||
1173 |
|
1181 | |||
1174 | class TestRunner(object): |
|
1182 | class TestRunner(object): | |
1175 | """Holds context for executing tests. |
|
1183 | """Holds context for executing tests. | |
@@ -1564,14 +1572,6 b' class TestRunner(object):' | |||||
1564 |
|
1572 | |||
1565 | return self._hgpath |
|
1573 | return self._hgpath | |
1566 |
|
1574 | |||
1567 | def _outputtimes(self): |
|
|||
1568 | vlog('# Producing time report') |
|
|||
1569 | self.times.sort(key=lambda t: (t[1], t[0]), reverse=True) |
|
|||
1570 | cols = '%7.3f %s' |
|
|||
1571 | print '\n%-7s %s' % ('Time', 'Test') |
|
|||
1572 | for test, timetaken in self.times: |
|
|||
1573 | print cols % (timetaken, test) |
|
|||
1574 |
|
||||
1575 | def _outputcoverage(self): |
|
1575 | def _outputcoverage(self): | |
1576 | vlog('# Producing coverage report') |
|
1576 | vlog('# Producing coverage report') | |
1577 | os.chdir(self.pythondir) |
|
1577 | os.chdir(self.pythondir) |
General Comments 0
You need to be logged in to leave comments.
Login now