{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/4"}],"enrichment":{"capability":"A pytest plugin that runs test functions concurrently in a thread pool to discover thread-safety issues, particularly useful for validating C library compatibility with free-threaded Python implementations.","skillfed_tags":["thread-safety","free-threading","stress-testing"],"use_cases":["Validate that C extension libraries work correctly under free-threaded Python builds before PEP 703 adoption","Stress-test thread safety of libraries by running the same test repeatedly in parallel threads to catch race conditions","Detect GIL-related bugs and verify behavior when the GIL is disabled in CPython implementations","Reproduce intermittent threading bugs by running tests in an endless loop (--forever) until failure occurs","Verify that pytest fixtures and test setup code handle concurrent access without data corruption"],"what_it_does":"pytest-run-parallel is a pytest plugin that executes test functions multiple times concurrently in a thread pool, rather than running different tests in parallel. Its primary purpose is stress-testing code for thread-safety issues, especially important for libraries that use C extensions and will run under free-threaded Python (PEP 703). The plugin is not a replacement for pytest-xdist; it focuses on discovering race conditions and GIL-related bugs by running the same test repeatedly across multiple threads with synchronized startup via a barrier.\n\nThe plugin provides command-line flags (--parallel-threads, --iterations, --skip-thread-unsafe, --forever) and per-test markers to control thread count and iteration behavior. It includes fixtures for thread and iteration indices, and patches tmp_path and tmpdir to be thread-safe. A key caveat: pytest itself is not thread-safe, so tests must account for shared fixture state across threads and avoid dynamically setting marks.","worth_installing":"Yes, if you maintain a library with C extensions or are preparing for free-threaded Python adoption. The plugin is actively maintained, has no security vulnerabilities, and solves a specific and growing need. Install with caution if your test suite relies heavily on mutable shared state via fixtures\u2014you will need to refactor tests to be thread-safe first."},"id":"pytest-run-parallel","links":{"html":"https://skillfed.io/packages/pytest-run-parallel","md":"https://skillfed.io/packages/pytest-run-parallel.md","pypi":"https://pypi.org/project/pytest-run-parallel/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-04","license_spdx":"MIT","license_treatment":"permissive","name":"pytest-run-parallel","python_support":"supports_current","summary":"A simple pytest plugin to run tests concurrently"},"popularity":{"monthly_downloads":230523,"position":9106,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.10.0"}
