Navigation Menu

Skip to content

Commit

Permalink
Issue #21445: Pass exception messages correctly to assertTrue in
Browse files Browse the repository at this point in the history
the FileCompareTestCase.test_matching test.

Patch by Steven Barker.
  • Loading branch information
berkerpeksag committed Aug 14, 2014
1 parent cd3aacf commit 143fe05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/test/test_filecmp.py
Expand Up @@ -27,13 +27,13 @@ def tearDown(self):
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):
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Expand Up @@ -78,6 +78,7 @@ Michael J. Barber
Daniel Barclay
Nicolas Bareil
Chris Barker
Steven Barker
Anton Barkovsky
Nick Barnes
Quentin Barnes
Expand Down

0 comments on commit 143fe05

Please sign in to comment.