http://www.pyconuk.org/sprints/unit-test-documentation-improvements/
We explored where the "Expected: 1, actual: 2" messages (used to) come from in unittest. We found that this code has already been improved back in 2011. Why were we still getting old output for so long?
Below are links to our findings, plus you can see the test cases we built and tested on various versions of Python.
Key BDFL 'ruling' ----------------
https://mail.python.org/pipermail/python-dev/2010-December/106954.html
... the least bad thing would be to drop any remnants of expected/actual terminology, keep the diffs in the first-second order, and let developers choose whether they put the expected value first or second.
- Consistency in unittest assert methods: order of actual, expected: http://bugs.python.org/issue10573
- additional unittest type equality methods: https://bugs.python.org/issue2578
- 3.3 unittest document not kept consist with code: https://bugs.python.org/issue11282
- https://bugs.python.org/issue14832
- summary: Issue #10242: backport of more fixes to unittest.TestCase.assertItemsEqual