pytest-instafail
pytest plugin to show failures instantly
What it is and what it does
pytest-instafail is a pytest plugin that changes how test failures are reported during a test run. Instead of collecting all failures and displaying them at the end of the session, it shows each failure or error as it happens, giving you immediate feedback on what broke. This is particularly useful during development when you want to see problems right away rather than waiting for the full test suite to complete.
The plugin integrates seamlessly into pytest's reporting system and requires only a single command-line flag (--instafail) to enable. It has a single runtime dependency on pytest itself, making it lightweight and easy to adopt in any pytest-based project. The package supports Python 3.7 through 3.11 and PyPy3, and has been actively maintained since its initial release in 2013.
Use it for:
- Enable faster feedback loops during test-driven development by seeing failures immediately instead of waiting for the full test suite.
- Diagnose cascading test failures more quickly by identifying the first failure in a chain without running the entire suite.
- Integrate into CI/CD pipelines where early failure detection can save time and resources.
- Debug flaky tests by observing the exact moment a test fails in real time rather than in a summary report.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that displays test failures and errors immediately as they occur, rather than deferring them until the end of the test session.
Yes. This is a low-friction, well-maintained plugin with no security issues that directly improves the test development experience. If you run pytest regularly and want faster feedback on failures, it's worth adding to your workflow—the --instafail flag is optional, so you can enable it only when needed.
Install
pytest-instafail on PyPI
pip
pip install pytest-instafailuv
uv add pytest-instafailpoetry
poetry add pytest-instafailInstalling pytest-instafail
Before you install
Low friction installation; the package depends only on pytest and is distributed as a pure Python wheel. Maintenance is active with recent commits and no known vulnerabilities.
License in practice
BSD license is permissive; you can use, modify, and distribute this package with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
pip install pytest-instafail
Then run tests with:
pytest --instafail
Requires pytest 5 or newer and Python 3.7 or PyPy3.
Verify before relying
- Whether the plugin works correctly with pytest's parallel execution modes (e.g., pytest-xdist).
- Performance impact on large test suites with many concurrent failures.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | actively maintained — 1,232 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,280,646/month — #1,758 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_instafail-0.5.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pytest-progressA pytest plugin that displays real-time test…
permissive · top 15,000 on PyPI
pytest-sugarA pytest plugin that improves test output with…
permissive · top 5,000 on PyPI
pytest-github-actions-annotate-failuresA pytest plugin that automatically annotates…
permissive · top 5,000 on PyPI
pytest-repeatA pytest plugin that repeats test execution a…
copyleft · top 5,000 on PyPI
pytest-rerunfailuresA pytest plugin that automatically reruns…
copyleft · top 1,000 on PyPI
pytest-sentryA pytest plugin that sends test failure and…
permissive · top 15,000 on PyPI
pytest-checkA pytest plugin that allows tests to continue…
unclear · top 5,000 on PyPI
pytest-error-for-skipsA pytest plugin that converts skipped tests…
permissive · top 15,000 on PyPI
pytest-ignore-test-resultsA pytest plugin that selectively ignores test…
permissive · top 15,000 on PyPI
testinfraTestinfra lets you write Python unit tests that…
permissive · top 15,000 on PyPI