]> granicus.if.org Git - python/commit
Better exception messages for unittest assert methods.
authorMichael Foord <fuzzyman@voidspace.org.uk>
Thu, 2 Apr 2009 03:20:38 +0000 (03:20 +0000)
committerMichael Foord <fuzzyman@voidspace.org.uk>
Thu, 2 Apr 2009 03:20:38 +0000 (03:20 +0000)
commit345b2fe21e7c18a7fd5cac4685e3daaf463a6b38
treef77081917d117ef94bb77f71eccdae0cca44b327
parentc4f90ebea78fab0d45340f4fb4b11298ee3ffdca
Better exception messages for unittest assert methods.

- unittest.assertNotEqual() now uses the inequality operator (!=) instead
  of the equality operator.

- Default assertTrue and assertFalse messages are now useful.

- TestCase has a longMessage attribute. This defaults to False, but if set to True
  useful error messages are shown in addition to explicit messages passed to assert methods.

Issue #5663
Doc/library/unittest.rst
Lib/test/test_unittest.py
Lib/unittest.py
Misc/NEWS