~/talk

A Sixth Seam in TDD? - Python Testing, Test Doubles & Legacy Code at Kosli

Talkat ACCU 2025 · 2025-04-01..04-04· [testing, python]
slides:none on file

Proposes a new test double called an auto cache that Kosli uses to speed and stabilise Python tests by replaying seam interactions from disk. Implements it as a pytest autouse fixture that yields a T object with a test ID, proxies seam calls, and either replays from pickle files or rebuilds and populates the cache. Uses runtime‑failures to rerun flaky cases; first run often populates the cache, second run reliably replays, cutting CI time.

AI-written summary · about

  1. 0:00Introduction and talk title correction
  2. 0:21Dylan Thomas reference and personal intro
  3. 0:59The idea: caching at seams in test code
  4. 1:14What is a seam? (Michael Feathers definition)
  5. 1:50Test doubles overview: dummy, stub, spy, mock, fake
  6. 2:38The sixth seam: auto cache concept
  7. 3:00Python implementation at Kosli
  8. 3:44pytest fixture with autouse
  9. 4:26Using the cache at the seam
  10. 4:47Replay vs rebuild logic
  11. 5:05Handling flaky tests with runtime-failures
~/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.