{"id":1667,"library":"pytest-instafail","title":"pytest-instafail","description":"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.","status":"active","version":"0.5.0","language":"en","source_language":"en","source_url":"https://github.com/pytest-dev/pytest-instafail","tags":["pytest-plugin","testing","developer-tool","ci/cd"],"install":[{"cmd":"pip install pytest-instafail","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Core testing framework that this plugin extends.","package":"pytest","optional":false}],"imports":[{"note":"pytest plugins are typically auto-discovered or activated via CLI flags.","symbol":"Plugin Activation","correct":"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."}],"quickstart":{"code":"import pytest\n\ndef test_passing_example():\n    assert True\n\ndef test_failing_example():\n    assert False\n\n# To run this, save as 'test_example.py' and execute in terminal:\n# pytest --instafail test_example.py","lang":"python","description":"To use pytest-instafail, simply install it and then run your tests with the `--instafail` flag. This will cause failures to be reported instantly."},"warnings":[{"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.","message":"Version 0.5.0 dropped support for Python 3.6. Ensure your environment uses Python 3.7 or newer.","severity":"breaking","affected_versions":"<0.5.0"},{"fix":"Upgrade pytest to version 5 or newer (`pip install --upgrade pytest`).","message":"pytest-instafail requires pytest 5 or newer. Using it with older pytest versions may lead to compatibility issues or errors.","severity":"breaking","affected_versions":"<0.5.0 (with pytest < 5)"},{"fix":"Upgrade to pytest-instafail 0.5.0 or newer to ensure compatibility and avoid deprecation warnings with recent pytest versions.","message":"Older 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`.","severity":"deprecated","affected_versions":"<0.5.0 (with pytest >= 7.2.0)"},{"fix":"Upgrade to pytest-instafail 0.4.2 or newer if using `pytest-xdist` for parallel test execution.","message":"When 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.","severity":"gotcha","affected_versions":"<0.4.2 (with pytest-xdist)"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}