Merge lp:~james-w/launchpad/more-matchers into lp:launchpad
| Status: | Work in progress |
|---|---|
| Proposed branch: | lp:~james-w/launchpad/more-matchers |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~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:~james-w/launchpad/more-matchers |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Robert Collins (community) | 2010-08-08 | Approve on 2010-08-08 | |
|
Review via email:
|
|||
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
- 11332. By James Westby on 2010-08-08
-
Dummy revision to force diff regeneration.
- 11333. By James Westby on 2010-08-08
-
Fix the docstrings given that it's not publications that superseded publications.
- 11334. By James Westby on 2010-08-09
-
Rename PublishedStateIsNot to PublishedStateI
sWrong as the first sounds like a matcher. - 11335. By James Westby on 2010-08-09
-
Use a normal function, not an inline one for title_of.
- 11336. By James Westby on 2010-08-09
-
Fix matcher import.
- 11337. By James Westby on 2010-08-09
-
Allow publishing records in the superseded check.
| Graham Binns (gmb) wrote : | # |
Trying to run this through EC2 I got a mass of conflicts:
Warning: criss-cross merge encountered. See bzr help criss-cross.
[...]
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Text conflict in lib/lp/
Please resolve these and then ping me and I'll be happy to re-try the landing.
| Robert Collins (lifeless) wrote : | # |
This clearly needs more work to be usable :(.
| Brad Crittenden (bac) wrote : | # |
This branch depends on two pre-requisite branches that have been marked as 'Work In Progress', so this one cannot progress until they do. I am therefore marking this branch WIP too.
Unmerged revisions
- 11337. By James Westby on 2010-08-09
-
Allow publishing records in the superseded check.
- 11336. By James Westby on 2010-08-09
-
Fix matcher import.
- 11335. By James Westby on 2010-08-09
-
Use a normal function, not an inline one for title_of.
- 11334. By James Westby on 2010-08-09
-
Rename PublishedStateIsNot to PublishedStateI
sWrong as the first sounds like a matcher. - 11333. By James Westby on 2010-08-08
-
Fix the docstrings given that it's not publications that superseded publications.
- 11332. By James Westby on 2010-08-08
-
Dummy revision to force diff regeneration.
- 11331. By James Westby on 2010-08-08
-
Clean up some lint.
- 11330. By James Westby on 2010-08-08
-
Replace checkSuperseded with the new matcher.
- 11329. By James Westby on 2010-08-08
-
Add an IsSupersededBy matcher.
- 11328. By James Westby on 2010-08-08
-
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.