paint last line red if "failures" or "errors" occured, attribute theuni

This commit is contained in:
holger krekel 2013-07-17 09:31:55 +02:00
parent 60a53c75a6
commit c53556b88d
3 changed files with 5 additions and 2 deletions

View File

@ -33,4 +33,4 @@ Graham Horler
Andreas Zeidler
Brian Okken
Katarzyna Jachim
Christian Theunert

View File

@ -1,6 +1,9 @@
Changes between 2.3.5 and 2.4.DEV
-----------------------------------
- color the last line red or green depending if failures/errors occured
or everything passed. thanks Christian Theunert.
- fix issue320 - fix class scope for fixtures when mixed with
module-level functions. Thanks Anatloy Bubenkoff.

View File

@ -457,7 +457,7 @@ class TerminalReporter:
msg = "%s in %.2f seconds" % (line, session_duration)
if self.verbosity >= 0:
markup = dict(bold=True)
if 'failed' in self.stats:
if 'failed' in self.stats or 'error' in self.stats:
markup['red'] = True
else:
markup['green'] = True