From d8701232badbeb115c2a455b71993ec0cc5e5a83 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Wed, 25 Jun 2014 20:59:32 +0300 Subject: [PATCH] Test ECC codec. --- ecc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ecc.py b/ecc.py index b312bae..4a4d43c 100644 --- a/ecc.py +++ b/ecc.py @@ -43,8 +43,9 @@ def decode(data, nsym=DEFAULT_NSYM): def test_codec(): - import os - x = bytearray(os.urandom(1024)) + import random + r = random.Random(0) + x = bytearray(r.randrange(0, 256) for i in range(16 * 1024)) y = encode(x) assert len(y) % BLOCK_SIZE == 0 x_ = decode(y)