[issue10573] Consistency in unittest assert methods: order of actual, expected
report at bugs.python.org
Mon Nov 29 01:55:59 CET 2010
New submission from Michael Foord <michael at voidspace.org.uk>:
The unittest documentation, argument names and implementation need to be consistent about the order of (actual, expected) for TestCase.assert methods that take two arguments.
This is particularly relevant for the methods that produce 'diffed' output on failure - as the order determines whether mismatched items are missing from the expected or additional to the expected.
The documentation, signatures and implementation of all two argument asserts need to be checked to ensure they are the same and implemented correctly.
Personally I prefer (actual, expected).
components: Documentation, Library (Lib)
title: Consistency in unittest assert methods: order of actual, expected
versions: Python 3.2
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list