summaryrefslogtreecommitdiff
path: root/test_six.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-08-21 17:39:03 -0500
committerBenjamin Peterson <benjamin@python.org>2013-08-21 17:39:03 -0500
commit0739fc05e28ec29df1fb2af5cb6747920c4790cd (patch)
treebd6b6b50d2be4fbea036788a8b67a274f6ff8979 /test_six.py
parent95c49decdf0c6ae28507fe3b275ef5f0ffd96412 (diff)
parent871339842a87c072cd952818544fcf53f934b99e (diff)
downloadsix-0739fc05e28ec29df1fb2af5cb6747920c4790cd.tar.gz
Merged in bmispelon/six (pull request #11)
Add itertools.zip_longest to six.moves.
Diffstat (limited to 'test_six.py')
-rw-r--r--test_six.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test_six.py b/test_six.py
index 4d7a233..e2131e7 100644
--- a/test_six.py
+++ b/test_six.py
@@ -114,6 +114,14 @@ def test_zip():
assert six.advance_iterator(zip(range(2), range(2))) == (0, 0)
+def test_zip_longest():
+ from six.moves import zip_longest
+ it = zip_longest(range(2), range(1))
+
+ assert six.advance_iterator(it) == (0, 0)
+ assert six.advance_iterator(it) == (1, None)
+
+
class TestCustomizedMoves:
def teardown_method(self, meth):