[issue14403] unittest module: provide inverse of "assertRaises"

Michael Foord report at bugs.python.org
Sun Mar 25 15:14:07 CEST 2012


Michael Foord <michael at voidspace.org.uk> added the comment:

The opposite of calling assertRaises is simply calling the code. A comment as to why you're calling the code is sufficient documentation as to the intent of the test.

In general the difference be a test failure and error is not useful - you *still* have to look at the traceback (failure details) to see *why* the test failed / errored. I'm sure the distinction comes from JUnit that unittest was originally based on (and yes - overengineered for Python).

----------
assignee:  -> michael.foord
resolution:  -> wont fix
status: open -> closed

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


More information about the Python-bugs-list mailing list