pytest-durations
Pytest plugin reporting fixtures and test functions execution time.
Decision gist · record as of 2026-08-14
Yes. This is a lightweight, actively maintained plugin with no security vulnerabilities, permissive licensing, and a single stable dependency. Install it if you need finer-grained visibility into test performance than pytest's built-in --durations provides, especially for large test suites where fixture overhead is significant.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (supports up to 3.14).
- Low friction: pure Python wheel with only pytest as a runtime dependency.
- Actively maintained with a release on 2026-08-14 and 44 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 44 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,493,107 downloads/mo, #2,602 on PyPI
Alternatives
Verify before relying
pip install pytest-durations
pytest --pytest-durations=10
# Shows fixture and test durations separately in the report- Whether the plugin's percentile columns (p90, p95, p99) are available in all output formats or only in specific configurations.
- Performance overhead of the plugin on very large test suites with thousands of tests.
What it is and what it does
pytest-durations is a pytest plugin that breaks down test execution time into separate measurements for fixtures, test setup, test calls, and teardown phases. Unlike pytest's built-in --durations flag, it isolates fixture durations from test function durations and accounts for fixtures with scope larger than "function" by subtracting their time from the test duration, giving you a clearer picture of what's actually slow in your test suite.
The plugin integrates directly into pytest and offers granular reporting options: you can filter which sections to display (fixture, call, setup, teardown), choose how to group results (by module, class, or function), select which statistics to show (total, num, min, med, max, and percentiles p90/p95/p99), and export results as JSON for CI integration. It works with pytest-xdist for distributed testing and handles time-traveling packages like freezegun.
Use it for
- Identify slow fixtures that are blocking your test suite and prioritize optimization efforts.
- Compare test performance across modules or classes to find which parts of your codebase have the slowest tests.
- Export timing data as JSON to track test performance trends over time in CI/CD pipelines.
- Debug test setup and teardown overhead separately from the actual test logic execution time.
- Use percentile columns to understand the distribution of test durations rather than just min/max values.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a lightweight, actively maintained plugin with no security vulnerabilities, permissive licensing, and a single stable dependency. Install it if you need finer-grained visibility into test performance than pytest's built-in --durations provides, especially for large test suites where fixture overhead is significant.
Install
pytest-durations on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with a release on 2026-08-14 and 44 repository stars.
Requires Python 3.10 or later (supports up to 3.14).
License in practice
MIT license (permissive) — you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pytest-durations
pytest --pytest-durations=10
# Shows fixture and test durations separately in the report
Verify before relying
- Whether the plugin's percentile columns (p90, p95, p99) are available in all output formats or only in specific configurations.
- Performance overhead of the plugin on very large test suites with thousands of tests.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,493,107 / month, #2,602 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Testing |
Evidence: pytest_durations-1.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest test duration measurement”
- pytest-durationsA pytest plugin that measures and reports fixture and test function…
- pytest-timerPytest plugin that measures and reports the execution time of…
- pytest-fail-slowA pytest plugin that marks tests as failed if they exceed a specified…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-extra-durations · pytest-timer · pytest-item-dict · pytest-timeouts · pytest-unused-fixtures · pytest-timestamper · pytest-fail-slow · pytest-benchmark · ipython-autotime · pytest-csv