[Zope3-checkins]
SVN: zope.testing/branches/colorized-output/src/zope/testing/testrunner.py
Highlight exceptions in doctests.
Marius Gedminas
marius at pov.lt
Fri Jul 13 12:05:44 EDT 2007
Log message for revision 77874:
Highlight exceptions in doctests.
Changed:
U zope.testing/branches/colorized-output/src/zope/testing/testrunner.py
-=-
Modified: zope.testing/branches/colorized-output/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/branches/colorized-output/src/zope/testing/testrunner.py 2007-07-13 16:04:45 UTC (rev 77873)
+++ zope.testing/branches/colorized-output/src/zope/testing/testrunner.py 2007-07-13 16:05:43 UTC (rev 77874)
@@ -584,7 +584,8 @@
'testname': 'lightcyan',
'failed-example': 'cyan',
'expected-output': 'green',
- 'actual-output': 'red',}
+ 'actual-output': 'red',
+ 'exception': 'red'}
prefixes = [('dark', '0;'),
('light', '1;'),
@@ -714,6 +715,10 @@
color_of_indented_text = 'expected-output'
elif line.startswith('Got:'):
color_of_indented_text = 'actual-output'
+ elif line.startswith('Exception raised:'):
+ color_of_indented_text = 'exception'
+ else:
+ color_of_indented_text = 'normal'
print line
More information about the Zope3-Checkins
mailing list