pytest-instafail

0.5.0 · active · verified Thu Apr 09

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.

Warnings

Install

Imports

Quickstart

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

view raw JSON →