[Zope-Checkins] CVS: Zope/utilities - testrunner.py:1.37
Tim Peters
tim.one@comcast.net
Fri, 23 May 2003 17:07:55 -0400
Update of /cvs-repository/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv9429/utilities
Modified Files:
testrunner.py
Log Message:
FancyTestResult.addError(): The showAll branch of this didn't allow
for that the passed-in err[0] may be a string, and when it was died
with an AttributeError in excname(). The verbose_on_error branch does
cater to err[0] being a string, so copied that logic into the showAll
branch.
=== Zope/utilities/testrunner.py 1.36 => 1.37 ===
--- Zope/utilities/testrunner.py:1.36 Fri Mar 21 15:22:30 2003
+++ Zope/utilities/testrunner.py Fri May 23 17:07:55 2003
@@ -237,7 +237,10 @@
def addError(self, test, err):
unittest.TestResult.addError(self, test, err)
if self.showAll:
- self.stream.writeln(excname(err[0]))
+ if isinstance(err[0], str):
+ self.stream.writeln(err[0])
+ else:
+ self.stream.writeln(excname(err[0]))
elif self.verbose_on_error:
if not self.have_blank_line:
self.stream.writeln()