common: use itertools.tee to split iterable

This commit is contained in:
Roman Zeyde
2014-09-21 15:17:11 +03:00
parent de453aa6b1
commit c3044e2ba7
2 changed files with 5 additions and 36 deletions

View File

@@ -27,15 +27,6 @@ def test_split():
iters = common.split(L, n=2)
assert list(zip(*iters)) == L
for i in [0, 1]:
iters = common.split(L, n=2)
next(iters[i])
try:
next(iters[i])
assert False
except IndexError as e:
assert e.args == (i,)
def test_icapture():
x = range(100)