diff -r 9778c77f05d6 -r ec17ddecdf64 tests/test-pathencode.py --- a/tests/test-pathencode.py Wed Jun 19 23:01:22 2013 -0700 +++ b/tests/test-pathencode.py Wed Jun 19 23:05:40 2013 -0700 @@ -125,7 +125,8 @@ p = pickfrom(rng, firsttable)(rng) l = len(p) ps = [p] - while l < k: + maxl = rng.randint(1, k) + while l < maxl: p = pickfrom(rng, resttable)(rng) l += len(p) ps.append(p)