Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)
Contributed by Bradley Laney..
(cherry picked from commit 6b490b5)

Co-authored-by: Bradley Laney <bradley.laney@gmail.com>
  • Loading branch information
stoksc authored and taleinat committed Jul 10, 2018
commit 5ebe03e1afe1fbde89b60f2ccf641034922ebd9a
3 changes: 1 addition & 2 deletions Lib/test/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ def testIteration(self):
# Test for appropriate errors mixing read* and iteration
for methodname, args in methods:
f = self.open(TESTFN, 'rb')
if next(f) != filler:
self.fail, "Broken testfile"
self.assertEqual(next(f), filler)
meth = getattr(f, methodname)
meth(*args) # This simply shouldn't fail
f.close()
Expand Down