--- id: pytest-timer version: "1.0.0" license: MIT license_treatment: permissive maintenance: dormant --- # pytest-timer — A timer plugin for pytest License: permissive · Maintenance: dormant · Downloads: 94.8K/mo ## What it is and what it does pytest-timer is a pytest plugin that automatically measures and displays the execution time of each test as part of the test report. It was ported from the nose-timer plugin for the older nose test runner. After running tests, it appends a summary section showing test names, their status, and duration in seconds. The plugin integrates directly into pytest's reporting pipeline with no configuration required beyond installation. It supports filtering to show only the slowest tests (via --timer-top-n), disabling colored output for headless environments (--timer-no-color), and filtering results by status color (--timer-filter). Optional dependencies on termcolor or colorama enable colored duration output. Use it for: - Identify slow tests in a suite to prioritize optimization efforts. - Monitor test performance regressions across commits by comparing duration reports. - Debug flaky tests by observing variance in execution time across runs. - Generate timing reports in CI/CD pipelines to track test suite health over time. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pytest plugin that measures and reports the execution time of individual tests, with options to filter by duration and disable colored output. Yes, if you need basic test timing visibility and accept dormant maintenance. The plugin is simple, has no security vulnerabilities, and low install friction. However, if you need active bug fixes, advanced profiling features, or support for newer pytest versions beyond 3.12, consider whether the lack of recent updates poses a risk for your project. ## Install pip install pytest-timer uv add pytest-timer poetry add pytest-timer ## Installing pytest-timer Before you install: Low friction install as a pure-Python wheel with only pytest as a runtime dependency. Maintenance is dormant—last release was 2023-12-26 and no commits since 2024-09-03—but the repository remains active and the package is stable enough for basic timing use. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install pytest-timer pytest --timer-top-n 10 Verify before relying: - Whether colored output (termcolor/colorama extras) works reliably on modern terminal emulators. - Whether the plugin handles async tests or parametrized tests correctly. - Performance impact when running large test suites with hundreds or thousands of tests. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 94.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest test timing, measure test duration, slowest tests report, pytest performance profiling, test execution time tracking, pytest-plugin, test-profiling [View on SkillFed](https://skillfed.io/packages/pytest-timer) · [View on PyPI](https://pypi.org/project/pytest-timer/)