Merge lp:~jml/testtools/stack-fixes into lp:~testtools-committers/testtools/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 233 | ||||
Proposed branch: | lp:~jml/testtools/stack-fixes | ||||
Merge into: | lp:~testtools-committers/testtools/trunk | ||||
Diff against target: |
119 lines (+61/-16) 2 files modified
testtools/testresult/real.py (+41/-16) testtools/tests/test_testresult.py (+20/-0) |
||||
To merge this branch: | bzr merge lp:~jml/testtools/stack-fixes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
testtools committers | Pending | ||
Review via email: mp+81332@code.launchpad.net |
Description of the change
Hello,
This is the first in a series of branches that are aimed at improving our traceback support. This one fixes bug 854769, where we are showing too many levels of stack when we are hiding our stack levels.
The problem was being caused by TestResult requiring an exact type match with failureException to trigger some of the stack hiding. When we switched to raising MismatchErrors, we lost the stack hiding for assertions.
The implementation approach has been to copy over the implementation of _exc_info_to_string and adapt it for our needs. I talked this over with mgz, who explained again the funky monkey patching that's in trunk now, and who agreed it would be a sane approach.
Thanks,
jml