← Back to team overview

testtools-dev team mailing list archive

[Bug 592262] Re: testtools breaks if a string exception is raised

 

Putting up a branch with a minimal fix for this, not including better
handling of errors from inside exception __str__ methods which would
need an equivalent fix in Python 3 traceback._some_str and is really
another issue anyway.

** Changed in: testtools
       Status: Incomplete => In Progress

** Changed in: testtools
     Assignee: (unassigned) => Martin [gz] (gz)

-- 
testtools breaks if a string exception is raised
https://bugs.launchpad.net/bugs/592262
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.

Status in Extensions to the Python unittest library: In Progress

Bug description:
Testtools deliberately lets string exceptions from test cases propagate, rather than cause failures:

    except Exception:
        # Note that bare exceptions are not caught, so raised strings will
        # escape: but they are deprecated anyway.

Given that, though deprecated, such things are not completely unheard of, see <lp:~jelmer/bzr/no-string-exc> for instance, it might be worth rethinking this. Bazaar at least has various bits of core infrastruture that prefer the test suite not to randomly fall over when it has issues.