Getting started with Hypothesis Hypothesis will speed up your testing process and improve your software quality, but when first starting out people often struggle to figure out exactly how to use it. Until you’re used to thinking in this style of testing, it’s not always obvious what the invariants of your code actually are, and people get stuck trying to come up with interesting ones to test. Fortunately, there’s a simple invariant which every piece of software should satisfy, and whic...| hypothesis.works
Test faster, fix more| hypothesis.works
Test faster, fix more| hypothesis.works
The Encode/Decode invariant One of the simplest types of invariant to find once you move past just fuzzing your code is asserting that two different operations should produce the same result, and one of the simplest instances of that is looking for encode/decode pairs. That is, you have some function that takes a value and encodes it as another value, and another that is supposed to reverse the process. This is ripe for testing with Hypothesis because it has a natural completely defined speci...| hypothesis.works
Automatic testing of Haskell programs| Hackage
Evolving toward property-based testing with Hypothesis Many people are quite comfortable writing ordinary unit tests, but feel a bit confused when they start with property-based testing. This post shows how two ordinary programmers started with normal Python unit tests and nudged them incrementally toward property-based tests, gaining many advantages on the way. Test faster, fix more| hypothesis.works