Merge lp:~jml/testtools/structure-from-dict into lp:~testtools-committers/testtools/trunk
Proposed by
Jonathan Lange
Status: | Merged |
---|---|
Merged at revision: | 204 |
Proposed branch: | lp:~jml/testtools/structure-from-dict |
Merge into: | lp:~testtools-committers/testtools/trunk |
Diff against target: |
81 lines (+31/-0) 4 files modified
NEWS (+3/-0) doc/for-test-authors.rst (+10/-0) testtools/matchers.py (+13/-0) testtools/tests/test_matchers.py (+5/-0) |
To merge this branch: | bzr merge lp:~jml/testtools/structure-from-dict |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
testtools developers | Pending | ||
Review via email: mp+68409@code.launchpad.net |
Description of the change
Inspired by a post to the launchpad-dev mailing list, this adds a new factory for MatchesStructure that takes the kwargs and assumes that we want to match the values by equality.
To post a comment you must log in.
Two small thoughts.
Rather than byEquality, consider ByEquality - I personally find the
distinction nice for classmethods.
Secondly, perhaps there is a helper waiting to get out in there: Equals, foo=3, bar=5) LessThan, foo=4, bar='then')
BuildStructure(
BuildStructure(
otherwise looks great.
-Rob