mirror of
https://github.com/romanz/amodem.git
synced 2026-04-02 09:46:52 +08:00
common: use itertools.tee to split iterable
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user