Merge lp:~gz/bzr/unbreak_BZR_TEST_PDB_504070 into lp:bzr
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | John A Meinel | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5470 | ||||
Proposed branch: | lp:~gz/bzr/unbreak_BZR_TEST_PDB_504070 | ||||
Merge into: | lp:bzr | ||||
Diff against target: |
161 lines (+92/-4) 2 files modified
bzrlib/tests/__init__.py (+21/-4) bzrlib/tests/test_selftest.py (+71/-0) |
||||
To merge this branch: | bzr merge lp:~gz/bzr/unbreak_BZR_TEST_PDB_504070 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email: mp+37434@code.launchpad.net |
Commit message
Fix BZR_TEST_PDB. (#504070)
Description of the change
Fix regression from introduction of testtools which made BZR_TEST_PDB useless as it didn't get you the actual traceback from the test.
As explained in the bug, because of the different way testtools runs test cases, we need to jump through some extra hoops to get the real traceback from the test, stash it somewhere, and then pass it on in addError and addFailure. The traceback is cleared in stopTest to break the cycle.
There's one case this branch doesn't handle, where the test passes but an exception is raised from a testtools cleanup. There the onException handler doesn't get given the traceback, so pdb will raise a ValueError as there's nothing for it to look at.
seems good to me.