Failing tests print traceback, log, and all twice
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
In Progress
|
Low
|
Unassigned |
Bug Description
Since selftest has depended on testtools, the full details of every failing test are printed to the console twice.
The way this used to work was that during the run, when a test failed it would print the exception instance, generally the contents AssertionError on one snappy line. Then, at the end of the run, a full traceback and log would be printed for every test that failed.
However, due to bug 501169 in testtools, rather than getting the actual exception that caused the problem, bzr now gets a _StringException instance. When str is called on that, rather than getting just the exception text, the entire testtools details object is stringified. Which is also what happens at the end of the run.
Related branches
- Martin Pool: Approve
- Martin Packman (community): Needs Information
- John A Meinel: Approve
-
Diff: 554 lines (+176/-116)4 files modifiedbzrlib/osutils.py (+10/-0)
bzrlib/tests/__init__.py (+121/-61)
bzrlib/tests/test_selftest.py (+36/-46)
bzrlib/tests/test_trace.py (+9/-9)
Changed in bzr: | |
status: | Confirmed → In Progress |
assignee: | nobody → Martin Pool (mbp) |
Changed in bzr: | |
assignee: | Martin Pool (mbp) → nobody |
I don't think that that bug is the cause; the cause is almost
certainly a non-upgraded TestResult API method in bzrlib.