Export to GitHub

pymox - issue #48

SwallowedExceptionError's _str__ method prints out one character per line when used with nose


Posted on Jul 28, 2012 by Massive Hippo

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,)

Status: New

Labels:
Type-Defect Priority-Medium