Python reference

pytest
cheat sheet.

pytest collection, assertions, fixtures, parametrization, mocks, async tests, plugins, and command-line options.

26 topics60 code examplesUpdated
How pytest fits together
01WriteName a function test_* and assert a result.
02Collectpytest discovers files and test cases.
03Set upFixtures supply reusable test data.
04ReportEach case passes, fails, skips or errors.
Jump to a specific topic

Choose a chapter

4 chapters · 26 topics