summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_file.py')
-rw-r--r--Lib/test/test_file.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index c4bd610..f682f89 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -95,7 +95,7 @@ class AutoFileTests(unittest.TestCase):
self.assert_(f.closed)
def testMethods(self):
- methods = ['fileno', 'flush', 'isatty', 'next', 'read', 'readinto',
+ methods = ['fileno', 'flush', 'isatty', '__next__', 'read', 'readinto',
'readline', 'readlines', 'seek', 'tell', 'truncate',
'write', '__iter__']
if sys.platform.startswith('atheos'):
@@ -248,7 +248,7 @@ class OtherFileTests(unittest.TestCase):
# Test for appropriate errors mixing read* and iteration
for methodname, args in methods:
f = open(TESTFN, 'rb')
- if f.next() != filler:
+ if next(f) != filler:
self.fail, "Broken testfile"
meth = getattr(f, methodname)
try:
@@ -269,7 +269,7 @@ class OtherFileTests(unittest.TestCase):
# between 4 and 16384 (inclusive).
f = open(TESTFN, 'rb')
for i in range(nchunks):
- f.next()
+ next(f)
testline = testlines.pop(0)
try:
line = f.readline()