The FIENDISH_TESTS list has 33 members, and when the number of
elements being tested is less than that (because you run the script
with, say, --elements=20) some will have a zero count. A recent fix
for Python 2.6 didn't take these possible zeros into account.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
c[x] = 1
fixed = []
for x in FIENDISH_TESTS:
- fixed += [norm(x)] * c[x]
+ fixed += [norm(x)] * c.get(x, 0)
rev = list(reversed(fixed))
self.expected_results[k] = (fixed, rev)