Merge lp://qastaging/~james-w/launchpad/more-matchers into lp://qastaging/launchpad
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~james-w/launchpad/more-matchers |
Merge into: | lp://qastaging/launchpad |
Prerequisite: | lp://qastaging/~james-w/launchpad/improve-makeDistroArchSeries |
Diff against target: |
745 lines (+559/-31) 7 files modified
lib/lp/soyuz/testing/matchers.py (+137/-0) lib/lp/soyuz/testing/tests/test_matchers.py (+244/-0) lib/lp/soyuz/tests/test_publishing.py (+7/-24) lib/lp/testing/factory.py (+1/-1) lib/lp/testing/matchers.py (+61/-3) lib/lp/testing/tests/test_factory.py (+10/-0) lib/lp/testing/tests/test_matchers.py (+99/-3) |
To merge this branch: | bzr merge lp://qastaging/~james-w/launchpad/more-matchers |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+32057@code.qastaging.launchpad.net |
Commit message
[r=lifeless][no-qa] Add some more matchers, particularly soyuz-specific ones.
Description of the change
Hi,
This ports some Soyuz custom assertion methods to matchers.
I did this so that tests can make use of them without having to
subclass what is a fairly heavyweight test class.
I could have added a new TestCase subclass with the custom assertion
methods only and slotted it in to the existing hierarchy, but matchers
are better.
Lint:
./lib/lp/
32: redefinition of unused 'os' from line 31
Thanks,
James
Unmerged revisions
- 11337. By James Westby
-
Allow publishing records in the superseded check.
- 11336. By James Westby
-
Fix matcher import.
- 11335. By James Westby
-
Use a normal function, not an inline one for title_of.
- 11334. By James Westby
-
Rename PublishedStateIsNot to PublishedStateI
sWrong as the first sounds like a matcher. - 11333. By James Westby
-
Fix the docstrings given that it's not publications that superseded publications.
- 11332. By James Westby
-
Dummy revision to force diff regeneration.
- 11331. By James Westby
-
Clean up some lint.
- 11330. By James Westby
-
Replace checkSuperseded with the new matcher.
- 11329. By James Westby
-
Add an IsSupersededBy matcher.
- 11328. By James Westby
-
Have test_publishing use the new matcher.
PublishedStateIsNot is a little weird to export, being a mismatch - might want to think about the clarity for users there.
PublishedStateIs would add more debug value if it included all the failing elements, not just the first.
Typo 'supecseded'
This could be a regular method, not inline.
+ def spr_title(spr):
DateIsInPast would be good to do upstream - its not launchpad domain specific at all.
Please consider these tweaks and recommendations.