summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_StringIO.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-04-21 15:47:16 (GMT)
committerGeorg Brandl <georg@python.org>2007-04-21 15:47:16 (GMT)
commita18af4e7a2091d11478754eb66ae387a85535763 (patch)
treefea8015d656cfee937bb6f3d106e6ca0e9f19d78 /Lib/test/test_StringIO.py
parent4d2adcca52ced412d4bdf131b872729c43520d58 (diff)
downloadcpython-a18af4e7a2091d11478754eb66ae387a85535763.zip
cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.gz
cpython-a18af4e7a2091d11478754eb66ae387a85535763.tar.bz2
PEP 3114: rename .next() to .__next__() and add next() builtin.
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r--Lib/test/test_StringIO.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py
index 9f79b02..83cd76c 100644
--- a/Lib/test/test_StringIO.py
+++ b/Lib/test/test_StringIO.py
@@ -89,14 +89,14 @@ class TestGenericStringIO(unittest.TestCase):
eq(iter(self._fp), self._fp)
# Does this object support the iteration protocol?
unless(hasattr(self._fp, '__iter__'))
- unless(hasattr(self._fp, 'next'))
+ unless(hasattr(self._fp, '__next__'))
i = 0
for line in self._fp:
eq(line, self._line + '\n')
i += 1
eq(i, 5)
self._fp.close()
- self.assertRaises(ValueError, self._fp.next)
+ self.assertRaises(ValueError, next, self._fp)
class TestStringIO(TestGenericStringIO):
MODULE = StringIO