~/talk

I hate writing tests, that's why I use Hypothesis

Talkat PyData NYC 2022 · 2022-11-09..11-11· [testing, developer-experience]
slides:none on file

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

  1. 0:00Frustration of writing tests
  2. 3:06Introduction
  3. 4:09Property-based testing
  4. 7:24Hypothesis implementation
  5. 9:54Live demo: edge case
  6. 12:40Hypothesis with NumPy
  7. 15:28Hypothesis with Pandas
  8. 18:22Lazy dev’s secret: Ghostwriter
  9. 23:57Ghostwriter strategies
  10. 28:37JSON round-trip testing
  11. 30:01Automated test generation
  12. 32:56Trade-offs with Hypothesis
  13. 36:11Closing remarks
  14. 36:55Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.