So that the order of arguments in the assertion matches the order of values in the error.
This patch makes that change. Some tomfoolery was needed to have the same principle hold for assertEqual which documents expected as its first parameter.
Also deprecates _BinaryMismatch.expected and _BinaryMismatch.observed attributes, which really don't need to be public at all.
From https://bugs.launchpad.net/testtools/+bug/1525227:
A test that does this:
Will report an error that looks like this:
I would expect it to look like this instead:
So that the order of arguments in the assertion matches the order of values in the error.
This patch makes that change. Some tomfoolery was needed to have the same principle hold for
assertEqual
which documentsexpected
as its first parameter.Also deprecates
_BinaryMismatch.expected
and_BinaryMismatch.observed
attributes, which really don't need to be public at all.