mirror of
https://github.com/romanz/amodem.git
synced 2026-04-20 21:26:39 +08:00
Fix ECC tests
This commit is contained in:
@@ -11,7 +11,6 @@ def test_random():
|
|||||||
r = random.Random(0)
|
r = random.Random(0)
|
||||||
x = bytearray(r.randrange(0, 256) for i in range(16 * 1024))
|
x = bytearray(r.randrange(0, 256) for i in range(16 * 1024))
|
||||||
y = ecc.encode(x)
|
y = ecc.encode(x)
|
||||||
assert len(y) % ecc.BLOCK_SIZE == 0
|
|
||||||
x_ = concat(ecc.decode(y))
|
x_ = concat(ecc.decode(y))
|
||||||
assert x_[:len(x)] == x
|
assert x_[:len(x)] == x
|
||||||
assert all(v == 0 for v in x_[len(x):])
|
assert all(v == 0 for v in x_[len(x):])
|
||||||
|
|||||||
Reference in New Issue
Block a user