~/talk

10 Ways To Shoot Yourself In The Foot With Tests

Talkat PyCon Israel 2024 · on Monday, 2024-09-16· [testing, python]
slides:none on file

Ten concrete ways tests fail teams and how to fix them: always verify a test by intentionally injecting a bug; avoid isolated tests that share memory, files, or DB rows; keep test data local and names decisive and specific; make each test assert one behavior; prefer behavioral tests over fragile implementation checks (example: editing a book description and migrating the field to a new DB table — behavior tests catch the bug, implementation tests can miss it); use in‑memory fake DB for fast runs and a few real‑DB checks; target fast feedback (ideally seconds, definitely under ~10 minutes).

AI-written summary · about

  1. 0:00Introduction
  2. 0:52Why invest in tests
  3. 2:18Non-isolated tests
  4. 3:03Readability issues
  5. 4:32Single fact tests
  6. 5:55Behavior vs implementation tests
  7. 8:45Behavioral test benefits
  8. 11:35Database fake usage
  9. 13:01Slow tests impact
  10. 15:11Fast feedback loop
  11. 17:38Test effort prioritization
  12. 19:02Summary
~/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.