Learn pytest
Python's de facto test framework: plain asserts, fixtures and plugins
pytest is the most widely used testing framework for Python. It discovers tests automatically, turns plain assert statements into detailed failure reports, and manages setup through composable fixtures. A rich plugin ecosystem adds parallel runs, coverage, async support and framework integrations, which makes it the backbone of testing in most Python projects.
Before you start
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know