summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.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_unicode.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_unicode.py')
-rw-r--r--Lib/test/test_unicode.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index b789fb0..cb7586c 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -99,10 +99,10 @@ class UnicodeTest(
def test_iterators(self):
# Make sure unicode objects have an __iter__ method
it = u"\u1111\u2222\u3333".__iter__()
- self.assertEqual(it.next(), u"\u1111")
- self.assertEqual(it.next(), u"\u2222")
- self.assertEqual(it.next(), u"\u3333")
- self.assertRaises(StopIteration, it.next)
+ self.assertEqual(next(it), u"\u1111")
+ self.assertEqual(next(it), u"\u2222")
+ self.assertEqual(next(it), u"\u3333")
+ self.assertRaises(StopIteration, next, it)
def test_count(self):
string_tests.CommonTest.test_count(self)