powerset & powerdict
Really nice to be able to list all combinations of a set or a dictionary. For example if you are testing a database update and want to check invariants under all possible updates.
Usage
from __future__ import print_function
test = print
map(
test,
powerdict({'a': 1, 'b': 2, 'c': 3})
)
Note
It also runs the test with an empty dictionary, and thereby catching the trivial case.