Kyle Marek-Spartz
kyle.marek.spartz@gmail.com
https://kyle.marek-spartz.org
April 10, 2014
True on successFalse or raises AssertionError on
failurefor_all takes a list of “generators” and a property. It
then tests the property for arbitrary (random) values of the
“generators”.Commutative properties of ints:
More complicated properties:
A “generator” is a specification of a set of possible Python objects. A “generator” is either:
None, bool, int,
float, long, complex,
str, tuple, set,
list, or dictArbitraryInterfaceArbitraryInterfacearbitrarymaybe_a(float)maybe_an(int)one_of(float, int)tuple_of(float, int)set_of(int)list_of(bool)dict_of(a=bool, b=int, c=float)faker generators for more semantic random
values