More testing with fewer tests
summary
Explains how Hypothesis generates thousands to millions of inputs so tests cover corner cases automatically, showing a concrete bug where averaging an empty list causes division by zero, floating‑point cast surprises, and a run‑length encode/decode property. Describes state-based testing that generates sequences of tree insert/delete operations and finds real bugs (Mercurial branch name with a double slash). Mentions Django and numpy plugins and the ability to freeze failing examples for repeatable CI runs.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:15Test cases
- 2:50Corner cases
- 4:18Example
- 6:23Propertybased testing
- 11:55Run protest
- 17:08Hypothesis test cases
- 18:06Other properties
- 20:06Pairing functions
- 22:03Security issues
- 23:04Statebased testing
- 24:14Binary tree
- 25:40Stateful tree
- 26:04State machine
- 28:03Test deletion
- 28:44Test case
- 30:35Hypothesis Works
related talks
01h 07mSufficiently Advanced Testing
41mProperty Based Testing with Hypothesis: Stronger Tests, Less Work
27mTesting Beyond Examples: Property Based Testing with Hypothesis
30mStop writing tests!
17mStop Writing Tests!
31mAdventures in not writing tests
27mAdventures in not writing tests
32mTest faster, fix more
