summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_file.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index 57e640d..6bfc4e6 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -247,8 +247,7 @@ class OtherFileTests(unittest.TestCase):
# 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()