Merge lp:~jtv/launchpad/decruft-test-template into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11145 |
Proposed branch: | lp:~jtv/launchpad/decruft-test-template |
Merge into: | lp:launchpad |
Diff against target: |
28 lines (+14/-4) 1 file modified
standard_test_template.py (+14/-4) |
To merge this branch: | bzr merge lp:~jtv/launchpad/decruft-test-template |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Francis J. Lacoste (community) | Approve | ||
Launchpad code reviewers | code | Pending | |
Review via email: mp+30083@code.launchpad.net |
Commit message
Update sample unit test file.
Description of the change
= Decruft standard test template =
This is an update I'd like for the sample unit-test file we provide in the project's top-level directory.
The boilerplate at the bottom of the test is no longer needed, as far as I know. If this is correct, I'd also like to remove it from as many existing tests as I reasonably can.
I also documented some guidelines and typical steps, such as the layer. I don't know how it is for others but I'm generally too lazy to remember what layers there are and where to import them from, so I included that information.
Is this too much? I don't want engineers to have to spend more time deleting text from the sample than they would otherwise spend putting up scaffolding.
The new file is lint-free. This is why the "XXX: Sample test class" comment is inside the test class, not above it: otherwise "make lint" would expect a double blank line between the comment and the class definition.
The new sample test also actually passes. Perhaps it would be worthwhile to make it part of the test suite so that we can be sure it doesn't fall out of date.
Jeroen
I think this is all good. Deleting text is easy, more than adding it, so I'm all in favor of it. You might want to get a second opinion though.