diff options
author | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-04-21 15:47:16 +0000 |
commit | fb634813509526a134b2449f32a35d3adf08d02d (patch) | |
tree | b8d2035015ea45e3dd6b52d8f1ecabd2b264bc8f /Lib/test/test_StringIO.py | |
parent | 62d08f86da83d841e70f2181a4427df26000a322 (diff) | |
download | cpython-fb634813509526a134b2449f32a35d3adf08d02d.tar.gz |
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.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py index 9f79b02e16..83cd76c0d1 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 |