pytest-dev / pytest-dev/pytest
Breakdown of setup duration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
At the moment, pytest aggregates together setup duration per test and displays it within the duration. This means if a setup is slow, you can identify it. However, if a setup is composed of multiple fixtures, there's no easy way to discern how much each of those fixtures took. Would be nice to have this information is shown, something like:
15.66s setup tests/test_provision.py::test_provision_requires_ok(fixture_a[5]+fixture_b[3]+fixture_c[7]s)
If the setup contains a single fixture, we can omit this part and not show fixtures whose time is less than 0.1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by locating pytest's setup-duration reporting entry point and its existing duration-reporting tests. Done means multi-fixture setup output shows each fixture's duration, while single-fixture setup can omit the breakdown and fixtures under 0.1 seconds are omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100