~/talk

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

Talkat PyCon SE 2022 · 2022-11-03..11-04· [testing, developer-experience]
slides:none on file

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

  1. 0:00Introduction and setup
  2. 1:48Why I hate writing tests
  3. 4:41Property-based testing explained
  4. 7:55How Hypothesis works
  5. 9:41Live demo with Hypothesis
  6. 13:09Ghostwriter feature demo
  7. 19:50More Ghostwriter strategies
  8. 22:15Pros and cons of Hypothesis
  9. 24:22Closing and Q&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.