Registry / testing / pytest-instafail

pytest-instafail

JSON →
library0.5.0pypypi✓ verified 27d ago

pytest-instafail is a plugin for pytest that enhances test reporting by displaying failures and errors immediately as they occur, rather than aggregating them until the entire test session concludes. The current version, 0.5.0, was released on March 31, 2023, indicating active maintenance and compatibility with recent pytest versions.

pip install pytest-instafail
INSTALL
IMPORT
SIG · PYTEST-INSTAFAIL
P
pytest-instafail
testingpythonv0.5.0
Install
2.7s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 32MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin Activation
This is a pytest plugin and is activated via the command line (--instafail) or automatically by pytest upon installation. It does not require explicit Python 'import' statements in user code.
pytest plugins are typically auto-discovered or activated via CLI flags.

To use pytest-instafail, simply install it and then run your tests with the `--instafail` flag. This will cause failures to be reported instantly.

import pytest def test_passing_example(): assert True def test_failing_example(): assert False # To run this, save as 'test_example.py' and execute in terminal: # pytest --instafail test_example.py
Debug
Known issues
breakingVersion 0.5.0 dropped support for Python 3.6. Ensure your environment uses Python 3.7 or newer.
fix
Upgrade Python to 3.7+ or use an older version of pytest-instafail (e.g., 0.4.x) if Python 3.6 is a strict requirement.
affects: <0.5.0
breakingpytest-instafail requires pytest 5 or newer. Using it with older pytest versions may lead to compatibility issues or errors.
fix
Upgrade pytest to version 5 or newer (`pip install --upgrade pytest`).
affects: <0.5.0 (with pytest < 5)
deprecatedOlder versions of pytest-instafail might issue deprecation warnings when used with pytest 7.2.0+ due to changes in hook configuration. Version 0.5.0 addressed this by using `pytest.hookimpl`.
fix
Upgrade to pytest-instafail 0.5.0 or newer to ensure compatibility and avoid deprecation warnings with recent pytest versions.
affects: <0.5.0 (with pytest >= 7.2.0)
gotchaWhen used in conjunction with `pytest-xdist`, ensure `pytest-instafail` is at least version 0.4.2 to avoid issues related to deprecated `pytest-xdist` slave aliases.
fix
Upgrade to pytest-instafail 0.4.2 or newer if using `pytest-xdist` for parallel test execution.
affects: <0.4.2 (with pytest-xdist)
Upgrade
Version history
0.5.0latest on PyPI · released Mar 31, 2023
Audit
Dependencies
pytestrequiredCore testing framework that this plugin extends.
Agent activity
21 hits · last 30 days
node
18
Resources
pytest-instafail — pip install pytest-instafail · libregistry