From: Zooko O'Whielacronx Date: Sat, 27 Jan 2007 03:16:12 +0000 (-0700) Subject: pyfec: weaken preconditions -- you can have up to 256 shares, and you don't have... X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~303 X-Git-Url: https://git.rkrishnan.org/htmlfontify-example.html?a=commitdiff_plain;h=9a39ec9f4e094dbaf99adaadc747a2e36c537f6e;p=tahoe-lafs%2Ftahoe-lafs.git pyfec: weaken preconditions -- you can have up to 256 shares, and you don't have to pad the individual shares except to make them all the same length --- diff --git a/pyfec/fec/test/test_pyfec.py b/pyfec/fec/test/test_pyfec.py index 26356f6f..b01a3e64 100644 --- a/pyfec/fec/test/test_pyfec.py +++ b/pyfec/fec/test/test_pyfec.py @@ -71,10 +71,10 @@ def pad_size(n, k): return 0 def _test_random(): - m = random.randrange(1, 255) + m = random.randrange(1, 257) k = random.randrange(1, m+1) l = random.randrange(0, 2**16) - ss = [ randstr(l/k) + '\x00' * pad_size(l/k, k) for x in range(k) ] + ss = [ randstr(l/k) for x in range(k) ] _h(k, m, ss) def test_random():