I hate writing tests, that's why I use Hypothesis
summary
Demonstrates using Hypothesis to replace example-based tests with generated inputs, showing a real run where pytest plus Hypothesis finds a crash on an empty string round-trip encode/decode, and how the Hypothesis Ghostwriter CLI emits complete test files (Black-formatted, also convertible to unittest) by inferring strategies from typing hints. Notes practical tradeoffs: generated tests can be slower, Ghostwriter needs type annotations for best results, and some cases still require hand-picked examples.
AI-written summary · about
chapters (9)
- 0:00Introduction and setup
- 1:48Why I hate writing tests
- 4:41Property-based testing explained
- 7:55How Hypothesis works
- 9:41Live demo with Hypothesis
- 13:09Ghostwriter feature demo
- 19:50More Ghostwriter strategies
- 22:15Pros and cons of Hypothesis
- 24:22Closing and Q&A








