[issue10573] Consistency in unittest assert methods: order of actual, expected

Michael Foord 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).

----------
assignee: michael.foord
components: Documentation, Library (Lib)
messages: 122752
nosy: michael.foord
priority: normal
severity: normal
status: open
title: Consistency in unittest assert methods: order of actual, expected
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10573>
_______________________________________


More information about the Python-bugs-list mailing list