I hate writing tests, that's why I use Hypothesis
summary
Claims that property-based testing with Hypothesis replaces example thinking, shows concrete tools: given and strategies drive generation, ghostwriter auto-generates tests from type hints, and round‑trip checks exercise encoder/decoder pairs. Demo runs pytest, Hypothesis produces a failing case — an empty string — so the code needs fixing. Notes tradeoffs: slower runs, harder-to-read implicit cases, and benefit from typing and CI integration to auto-run generated tests.
AI-written summary · about
chapters (14)
- 0:00Frustration of writing tests
- 3:06Introduction
- 4:09Property-based testing
- 7:24Hypothesis implementation
- 9:54Live demo: edge case
- 12:40Hypothesis with NumPy
- 15:28Hypothesis with Pandas
- 18:22Lazy dev’s secret: Ghostwriter
- 23:57Ghostwriter strategies
- 28:37JSON round-trip testing
- 30:01Automated test generation
- 32:56Trade-offs with Hypothesis
- 36:11Closing remarks
- 36:55Q&A
related talks
27mI hate writing tests, that's why I use Hypothesis
27mI hate writing tests, that's why I use Hypothesis
30mStop Writing Tests!
30mI Hate writing Tests, That's Why I Use Hypothesis
17mStop Writing Tests!
31mAdventures in not writing tests
27mTesting Beyond Examples: Property Based Testing with Hypothesis
30mStop writing tests!
