Merge lp:~jtv/maas-test/fix-setup-error-reporting into lp:maas-test
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | 17 |
Merged at revision: | 17 |
Proposed branch: | lp:~jtv/maas-test/fix-setup-error-reporting |
Merge into: | lp:maas-test |
Diff against target: |
63 lines (+13/-14) 1 file modified
maastest/main.py (+13/-14) |
To merge this branch: | bzr merge lp:~jtv/maas-test/fix-setup-error-reporting |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Edwards (community) | Approve | ||
Review via email: mp+194781@code.launchpad.net |
Commit message
Fix breakage when reporting errors during the main script's test setup.
Description of the change
We were using an undocumented trick to show a test's full docstring as part of its description, and it broke when no test was running at the time of the error. There is a documented way: override shortDescription() on the test case.
This won't scale trivially to multiple test cases, but we can cross that bridge when we get to it. A mix-in base class would do it, or a decorator, or just repeating the one-liner with a brief docstring, or patching up the test runner.
(Also, we no longer use the command counter in TestMAAS. That moved into the KVMFixture.)
Jeroen
To post a comment you must log in.