Issue 48 in pymox: SwallowedExceptionError's _str__ method prints out one character per line when used with nose

3 views
Skip to first unread message

codesite...@google.com

unread,
Jul 27, 2012, 10:26:15 PM7/27/12
to mox-d...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 48 by kunalpar...@gmail.com: SwallowedExceptionError's _str__
method prints out one character per line when used with nose
http://code.google.com/p/pymox/issues/detail?id=48

Similar to Issue 34

This fixed the problems for me:

def __str__(self):
if isinstance(self._previous_exceptions, basestring):
exceptions = self._previous_exceptions
else:
exceptions = "\n".join(["%3d. %s: %s" % (i,
e.__class__.__name__, e)
for i, e in
enumerate(self._previous_exceptions)])
return "Previous exceptions thrown:\n%s" % (exceptions,)


Reply all
Reply to author
Forward
0 new messages