tests: move to root directory

This commit is contained in:
Roman Zeyde
2014-08-05 09:22:51 +03:00
parent d94675e7d7
commit 83d6a355b5
6 changed files with 0 additions and 0 deletions

15
tests/test_ecc.py Normal file
View File

@@ -0,0 +1,15 @@
import ecc
import random
import itertools
def concat(chunks):
return bytearray(itertools.chain.from_iterable(chunks))
def test_random():
r = random.Random(0)
x = bytearray(r.randrange(0, 256) for i in range(64 * 1024))
y = ecc.encode(x)
x_ = concat(ecc.decode(y))
assert x_ == x