{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/8"}],"enrichment":{"capability":"Captures exceptions raised in threads during pytest tests and re-raises them in the main thread so that multi-threaded test failures are properly detected.","skillfed_tags":["pytest-plugin","threading","test-utilities"],"use_cases":["Testing concurrent code where worker threads perform assertions that must be validated by the main test","Verifying that background tasks or thread pools fail correctly when they encounter errors","Debugging multi-threaded applications by ensuring thread exceptions don't silently pass tests","Wrapping thread target functions with exception capture to keep threads alive while collecting errors","Comparing captured thread exceptions against expected error types or messages in test assertions"],"what_it_does":"pytest-reraise is a pytest plugin that solves a specific threading problem: when you write assertions inside a thread spawned from a test, those assertions fail silently because the exception is raised in the thread, not the main test thread. The plugin provides a `reraise` fixture that acts as a context manager to capture exceptions from worker threads and re-raise them in the main thread at the end of the test, making the test fail as expected.\n\nThe plugin supports wrapping functions as decorators, manually triggering re-raises mid-test, handling multiple exceptions (keeping the first), optionally catching exceptions to prevent them from crashing the thread, and accessing or resetting captured exceptions. It's designed for developers writing multi-threaded tests who need pytest to properly detect assertion failures that occur in spawned threads.","worth_installing":"Yes, if you actively write multi-threaded pytest tests and need thread exceptions to fail your tests. The low install friction and permissive license make adoption easy. However, the abandoned maintenance status (last commit 2023-02-06) is a concern\u2014verify compatibility with your pytest and Python versions before relying on it for new projects, and monitor for any unresolved issues with newer releases."},"id":"pytest-reraise","links":{"html":"https://skillfed.io/packages/pytest-reraise","md":"https://skillfed.io/packages/pytest-reraise.md","pypi":"https://pypi.org/project/pytest-reraise/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2022-09-20","license_spdx":null,"license_treatment":"permissive","name":"pytest-reraise","python_support":"supports_current","summary":"Make multi-threaded pytest test cases fail when they should"},"popularity":{"monthly_downloads":180427,"position":10145,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.2"}
