(original) (raw)

Index: Doc/library/unittest.rst =================================================================== --- Doc/library/unittest.rst (revision 78460) +++ Doc/library/unittest.rst (working copy) @@ -1027,8 +1027,8 @@ unequal objects. Setting this attribute to True allows you to have a custom error message in addition to the normal one. - This attribute defaults to False, meaning that a custom message passed - to an assert method will silence the normal message. + This attribute defaults to True. If set to False then a custom message + passed to an assert method will silence the normal message. The class setting can be overridden in individual tests by assigning an instance attribute to True or False before calling the assert methods. Index: Lib/unittest/case.py =================================================================== --- Lib/unittest/case.py (revision 78460) +++ Lib/unittest/case.py (working copy) @@ -162,7 +162,7 @@ # objects used in assert methods) will be printed on failure in *addition* # to any explicit message passed. - longMessage = False + longMessage = True def __init__(self, methodName='runTest'): Index: Lib/test/test_unittest.py =================================================================== --- Lib/test/test_unittest.py (revision 78460) +++ Lib/test/test_unittest.py (working copy) @@ -3122,7 +3122,7 @@ self.testableFalse = TestableTestFalse('testTest') def testDefault(self): - self.assertFalse(TestCase.longMessage) + self.assertTrue(TestCase.longMessage) def test_formatMsg(self): self.assertEquals(self.testableFalse._formatMessage(None, "foo"), "foo")