Why I use py.test and maybe you should too
summary
Argues that pytest makes it dramatically easier to start unit testing by reducing boilerplate (example: four-line pytest vs nine-line unittest) and offering pytest auto-discovery, parametrization, fixtures and plugins; demonstrates testing a URI-splitting function and adding a failing ValueError test first, then fixing code; recommends the iterative write failing test for every bug approach, using module/class-level setup to avoid expensive repeated teardowns, and tools like coverage.py, testtools and testfixtures for larger projects.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 2:40Unit testing principles
- 8:07Key advantages
- 15:00Writing less code
- 16:33Bug triage
- 21:04Where to put your tests








