~/talk

Introduction to Property-Based Testing

Talkat PyCon US 2023 · 2023-04-19..04-27· [testing, developer-experience]
slides:none on file

Introduction covers property-based testing using Hypothesis and pytest with runnable examples that actually find bugs: a NaN case breaking sort, floating-point mean turned infinite for two huge floats, binaryornot failing due to chardet, Mercurial round‑trip crashes, and JSON/gzip round trips. Tutorial shows tools like strategies, map/filter, composite, Atheris/HypoFuzz and shared example DBs, explains settings and determinism, and notes defaults like 100 examples per test and a 200ms deadline while demonstrating tests that reproduce failures and then shrink them.

AI-written summary · about

  1. 0:00Property-based testing intro
  2. 1:03What is PBT and why it matters
  3. 10:56PBT finds bugs in code
  4. 11:58Installing Hypothesis
  5. 37:18Describing data with strategies
  6. 1:00:00PBT test tactics
  7. 1:22:07PBT in production tips
  8. 1:31:04Q&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.