Hi, Property based testing is not about just generating random values till the > heath death of the universe, but generating sensible values in a > configurable way to cover all equivalence classes we can think of. if my > function takes two floating point numbers as arguments, hypothesis > "strategies" won't try all possible combinations of all possible floating > point values, but instead all possible combination of interesting values > (NaN, Infinity, too big, too small, positive, negative, zero, None, decimal > fractions, etc..), something that an experienced programmer probably would > end up doing by himself with a lot of test cases, but that can be better > done with less effort by the automation provided by the hypothesis package. >
Exactly. A tool can go a step further and, based on the assertions and contracts, generate the tests automatically or prove that certain properties of the program always hold. I would encourage people interested in automatic testing to have a look at the scientific literature on the topic (formal static analysis). Abstract interpretation has been already mentioned: https://en.wikipedia.org/wiki/Abstract_interpretation. For some bleeding edge, have a look what they do at this lab with the machine learning: https://eth-sri.github.io/publications/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/