Property based testing with Hypothesis
summary
Hypothesis is a Python property-based testing library that generates hundreds to thousands of concrete examples from high-level properties, finds empty and common edge cases (e.g. min on empty lists, binaryornot crash, broken means, Unicode normalization mismatches), and automatically shrinks failing examples to minimal counterexamples. It records failures on disk so reruns reproduce bugs (example database persists failures), uses coverage feedback to bias generation, and is extensible — a Rust core and Ruby port are planned — letting tests expose surprising cross-module and serialization/normalization bugs.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 4:50Finding bugs
- 7:59State
- 10:48Equivalence
- 15:43Fussing assumption
- 16:30Obvious bugs
- 18:13Common bugs
- 20:59Finding common bugs
- 22:12Decoupling
- 22:47Bugs
- 26:28State collapse
- 28:50Serialization
- 32:32Normalization
- 47:32Roadmap
related talks
41mProperty Based Testing in Python with Hypothesis
27mTesting Beyond Examples: Property Based Testing with Hypothesis
41mProperty Based Testing with Hypothesis: Stronger Tests, Less Work
27mHypothesis: Simpler Powerful Test Cases
26mProperty Based Testing the Python Way
40mProperty-based Thinking
42mI hate writing tests, that's why I use Hypothesis
01h 24mIntroduction to Property Based Testing
