Equals puts values around the wrong way

Bug #1525227 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Undecided
Jonathan Lange

Bug Description

A test that does this:

    self.assertThat('a', Equals('b'))

Will report an error that looks like this:

    testtools.matchers._impl.MismatchError: 'b' != 'a'

I would expect it to look like this instead:

    testtools.matchers._impl.MismatchError: 'a' != 'b'

Where the order of values in the error matches the order of values on the line of the assertion. This is particularly confusing when 'a' and 'b' are variables instead of literals, and when the values are very similar (e.g. both short strings but one ends with a newline—which is expected and which is actual?)

Jonathan Lange (jml)
Changed in testtools:
status: New → In Progress
assignee: nobody → Jonathan Lange (jml)
Revision history for this message
Jonathan Lange (jml) wrote :
Changed in testtools:
status: In Progress → Fix Committed
Jonathan Lange (jml)
Changed in testtools:
milestone: none → next
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.