skillfed

pytest-instafail

pytest plugin to show failures instantly

pytest-instafail v0.5.0 7.3M downloads/30d#1,758 on PyPI147
Permissive license BSD Active released

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-instafail

uv

uv add pytest-instafail

poetry

poetry add pytest-instafail

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: Utilities

Tags

pytest instant failure displayshow test failures immediatelypytest plugin real-time errorsinstant test failure outputpytest fail fast feedbacklive test error reporting
pytest-plugintest-feedback

More Libraries packages