Merge lp:~allenap/testtools/lessthan-mismatch-string into lp:~testtools-committers/testtools/trunk
Proposed by
Gavin Panella
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 186 | ||||
Proposed branch: | lp:~allenap/testtools/lessthan-mismatch-string | ||||
Merge into: | lp:~testtools-committers/testtools/trunk | ||||
Diff against target: |
28 lines (+5/-2) 2 files modified
testtools/matchers.py (+1/-1) testtools/tests/test_matchers.py (+4/-1) |
||||
To merge this branch: | bzr merge lp:~allenap/testtools/lessthan-mismatch-string | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange | Approve | ||
Review via email: mp+57323@code.launchpad.net |
Description of the change
The other _BinaryComparison subclasses - Equals, NotEquals, Is - give
mismatch messages that describe the problem. LessThan gives a mismatch
message that appears to describe the test... except that it doesn't.
Presently it'll say things like:
44 is >= 55
12 is >= 12
I've changed it to say:
44 is not > 55
12 is not > 12
To post a comment you must log in.
This is inverted I think. Adding another test for assertThat(4.1,
LessThan(4.0)) should show this more clearly.
I can understand the current warning being confusing, but I'm pretty
sure it is correct.