summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-02-05 12:42:33 -0500
committerBenjamin Peterson <benjamin@python.org>2012-02-05 12:42:33 -0500
commit6d35af994a8f82db6dd95cb1a9082cd9dc995ea3 (patch)
treeee0d406d5a70395675bba08131d6b4406de1c76f /test_six.py
parent0b4f066de228a6a533965997978b16b95f12eaa7 (diff)
downloadsix-git-6d35af994a8f82db6dd95cb1a9082cd9dc995ea3.tar.gz
alias advance_iterator to next
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test_six.py b/test_six.py
index 6e2c7ff..a99fbb3 100644
--- a/test_six.py
+++ b/test_six.py
@@ -226,12 +226,13 @@ def test_dictionary_iterators():
def test_advance_iterator():
+ assert six.next is six.advance_iterator
l = [1, 2]
it = iter(l)
- assert six.advance_iterator(it) == 1
- assert six.advance_iterator(it) == 2
- py.test.raises(StopIteration, six.advance_iterator, it)
- py.test.raises(StopIteration, six.advance_iterator, it)
+ assert six.next(it) == 1
+ assert six.next(it) == 2
+ py.test.raises(StopIteration, six.next, it)
+ py.test.raises(StopIteration, six.next, it)
def test_iterator():