8000 [2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-80… · python/cpython@6f036bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f036bb

Browse files
authored
[2.7] bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091) (#8225)
Actually just one fix on the 2.7 branch. Contributed by Bradley Laney. (cherry picked from commit 6b490b5)
1 parent dc39a59 commit 6f036bb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/test/test_file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ def testIteration(self):
247247
# Test for appropriate errors mixing read* and iteration
248248
for methodname, args in methods:
249249
f = self.open(TESTFN, 'rb')
250-
if next(f) != filler:
251-
self.fail, "Broken testfile"
250+
self.assertEqual(next(f), filler)
252251
meth = getattr(f, methodname)
253252
meth(*args) # This simply shouldn't fail
254253
f.close()

0 commit comments

Comments
 (0)
0