~/talk

How to Write Tests More Cheaply

TalkinRussianat PyCon Weekend 2022 · 2022-03-25..03-26· [testing]
links:none on file
slides:none on file

Shows how to write tests cheaply and correctly for Python apps by combining unit and integration tests, using pytest and the mocker plugin. Covers application and test architecture that makes integration tests convenient, demonstrates on a real example how pure unit-only or pure integration-only approaches miss bugs, and presents a middle-ground workflow between TDD and ‘write then test’. Also demonstrates deep testing (including base classes), argues high coverage isn’t always good, and promotes developing code alongside tests for balanced quality and cost.

AI-written summary · about

  1. 0:00Introduction
  2. 1:48Why write tests
  3. 4:20Cheap tests matter
  4. 6:04Parallel test execution
  5. 8:13Test structure basics
  6. 9:18Organizing test data
  7. 11:45Textures for dependencies
  8. 13:53Factories vs textures
  9. 15:43Testing actions properly
  10. 18:11Meaningful test names
  11. 20:52Unit vs integration tests
  12. 24:25Cheap test requirements
  13. 26:11Summary and Q&A
  14. 26:33Q&A: Parallel test runs
  15. 28:22Q&A: Slow integration tests
  16. 31:34Q&A: Contest structure
  17. 32:58Q&A: Dynamic test data
  18. 34:26Q&A: Finding textures
  19. 36:32Q&A: Factory alternatives
  20. 39:04Q&A: Parameterized tests
  21. 40:28Q&A: BDD approach
  22. 41:33Q&A: Manual data parsing
  23. 42:16Q&A: Test variability
  24. 44:45Q&A: Texture organization
  25. 45:27Q&A: Custom plugins
  26. 46:15Q&A: Test sequences
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.