~/talk

Stop Writing Tests!

Talkat Conf42 Python 2021 · on Thursday, 2021-05-27· [testing]
links:none on file
slides:none on file

Argues that instead of hand-crafting example inputs, use property-based testing with Hypothesis to assert invariants (sorted order + same multiset via collections.Counter) and let the library generate cases; shows Hypothesis Ghostwriter that auto-produces tests (including idempotence and round‑trip checks). Demonstrates coverage‑guided fuzzing with atheris and the pure‑Python hyperfuzz to run many tests concurrently, finds real bugs (JSON nan/infinity edge cases, ast.unparse absence, an invalid‑input crash in Black), and recommends migrating tests incrementally.

AI-written summary · about

  1. 0:00Introduction
  2. 1:17What testing really means
  3. 3:00Limitations of traditional testing
  4. 5:07Property-based testing
  5. 7:14Three-step plan for Hypothesis
  6. 9:17Round-trip property tests for persistence
  7. 12:28Migrating tests to property-based
  8. 14:55Coverage-guided fuzzing with Hypothesis
  9. 16:17Live demo of HypoFuzz
  10. 17:00Summary and call to action
~/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.