diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-12-03 00:53:09 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-12-03 00:53:09 (GMT) |
commit | 5074df623b70cf196965af332092a6f98a035c3d (patch) | |
tree | 25fdc5c475e5d4a344ed269707d327be72ae1363 /Lib/unittest | |
parent | 1203720ffb7d722df0c5322dcdd250eefd79c6ab (diff) | |
download | cpython-5074df623b70cf196965af332092a6f98a035c3d.zip cpython-5074df623b70cf196965af332092a6f98a035c3d.tar.gz cpython-5074df623b70cf196965af332092a6f98a035c3d.tar.bz2 |
Issue 7911: unittest.TestCase.longMessage defaults to True for improved failure messages by default
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/case.py | 2 | ||||
-rw-r--r-- | Lib/unittest/test/test_assertions.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index bb337f1..227879c 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -245,7 +245,7 @@ class TestCase(object): # objects used in assert methods) will be printed on failure in *addition* # to any explicit message passed. - longMessage = False + longMessage = True # This attribute sets the maximum length of a diff in failure messages # by assert methods using difflib. It is looked up as an instance attribute diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py index 0ee7edb..69572ee 100644 --- a/Lib/unittest/test/test_assertions.py +++ b/Lib/unittest/test/test_assertions.py @@ -127,7 +127,7 @@ class TestLongMessage(unittest.TestCase): self.testableFalse = TestableTestFalse('testTest') def testDefault(self): - self.assertFalse(unittest.TestCase.longMessage) + self.assertTrue(unittest.TestCase.longMessage) def test_formatMsg(self): self.assertEqual(self.testableFalse._formatMessage(None, "foo"), "foo") |