common: move izip() from recv module and refactor it a bit

This commit is contained in:
Roman Zeyde
2014-09-07 18:24:40 +03:00
parent d22ef08966
commit bc4497ed1b
3 changed files with 13 additions and 7 deletions

View File

@@ -60,3 +60,8 @@ def test_saturation():
assert False
except common.SaturationError as e:
assert e.args == (max(x),)
def test_izip():
x = range(10)
y = range(-10, 0)
assert list(common.izip([x, y])) == list(zip(x, y))