--durations
The pytest option that lists the slowest tests and how long each took.
In more detail
--durations=10 prints the ten slowest; very fast tests are hidden unless you add -vv. It is how you measure your suite's real shape before arguing about it.
Example
pytest -q --durations=3Related terms
- marker — A label attached to a test with @pytest.mark.name so you can select, skip or configure tests by that label.
- test pyramid — A guide for balancing a test suite: many fast unit tests, fewer integration tests and a small number of end-to-end tests.
Taught in
- The Test Pyramid And Where It Is Wrong — Automated Testing, TDD & Quality Engineering