Issue #21445: Pass exception messages correctly to assertTrue in

the FileCompareTestCase.test_matching test.

Patch by Steven Barker.
This commit is contained in:
Berker Peksag 2014-08-14 08:35:15 +03:00
commit 3714ab4c27
2 changed files with 5 additions and 4 deletions

View File

@ -27,13 +27,13 @@ class FileCompareTestCase(unittest.TestCase):
os.unlink(self.name_diff)
def test_matching(self):
self.assertTrue(filecmp.cmp(self.name, self.name_same),
"Comparing file to itself fails")
self.assertTrue(filecmp.cmp(self.name, self.name_same, shallow=False),
self.assertTrue(filecmp.cmp(self.name, self.name),
"Comparing file to itself fails")
self.assertTrue(filecmp.cmp(self.name, self.name, shallow=False),
"Comparing file to itself fails")
self.assertTrue(filecmp.cmp(self.name, self.name_same),
"Comparing file to identical file fails")
self.assertTrue(filecmp.cmp(self.name, self.name),
self.assertTrue(filecmp.cmp(self.name, self.name_same, shallow=False),
"Comparing file to identical file fails")
def test_different(self):

View File

@ -79,6 +79,7 @@ Michael J. Barber
Daniel Barclay
Nicolas Bareil
Chris Barker
Steven Barker
Anton Barkovsky
Nick Barnes
Quentin Barnes