$npx skillfedfor your agent

pytest-race

Race conditions tester for pytest

With conditionsPyPI TestingReleased Jun 2022792.8K downloads / moBSD 3-Clause LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_race-0.2.0-py3-none-any.whl
v0.2.0 · released 2022-06-07

Yes, if you need to test for race conditions in a pytest suite and are willing to accept the maintenance risk. The package is simple, has no dependencies, and works for its stated purpose. However, verify compatibility with your pytest and Python versions first, since the project is no longer maintained.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7+ and pytest 2.9.0+
  • Installation is straightforward with no runtime dependencies.
  • However, the project is abandoned—last updated in 2022 with no recent maintenance, so compatibility with newer versions is uncertain.

License · maintenance · safety

BSD 3-Clause License (permissive) — BSD 3-Clause License is permissive and poses no restrictions on use, modification, or distribution in proprietary or open-source projects.

last release 2022-06-07 (1529 days) · last repo commit 2022-06-07 · 6 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 792,803 downloads/mo, #5,044 on PyPI

Verify before relying

pip install pytest-race

from time import sleep

def test_race(start_race):
    def actual_test():
        global ACCUMULATOR
        ACCUMULATOR += 1
        assert ACCUMULATOR > 0
    start_race(threads_num=2, target=actual_test)
  • Whether the fixture works reliably with current pytest versions (last tested in 2022)
  • Whether the threading approach reliably surfaces race conditions or if timing-dependent tests may be flaky
Same gist for agents: .md · .json

What it is and what it does

pytest-race is a pytest plugin that adds a `start_race` fixture for testing code that may have race conditions. It runs a test function concurrently in multiple threads and checks whether the code behaves correctly under concurrent access. The fixture accepts a thread count and a test callable, then executes that callable in parallel threads to expose timing-dependent bugs.

The package has no runtime dependencies beyond pytest itself, making it lightweight to add to a test suite. However, it has been abandoned since 2022, so compatibility with modern pytest and Python versions is uncertain. The approach of using threads to surface race conditions is inherently probabilistic—bugs may not always manifest in a single test run.

Use it for

  • Verify that global state or shared variables are protected against concurrent modification in multi-threaded code.
  • Test thread-safe implementations of caches, counters, or other mutable objects accessed from multiple threads.
  • Detect data corruption or assertion failures that occur only under concurrent access patterns.
  • Validate that locks or synchronization primitives are correctly placed in critical sections.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to test for race conditions in a pytest suite and are willing to accept the maintenance risk.

The package is simple, has no dependencies, and works for its stated purpose. However, verify compatibility with your pytest and Python versions first, since the project is no longer maintained.

Install

pytest-race on PyPI

Before you install

Installation is straightforward with no runtime dependencies. However, the project is abandoned—last updated in 2022 with no recent maintenance, so compatibility with newer versions is uncertain.

Requires Python 3.7+ and pytest 2.9.0+

License in practice

BSD 3-Clause License is permissive and poses no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install pytest-race

from time import sleep

def test_race(start_race):
    def actual_test():
        global ACCUMULATOR
        ACCUMULATOR += 1
        assert ACCUMULATOR > 0
    start_race(threads_num=2, target=actual_test)

Verify before relying

  • Whether the fixture works reliably with current pytest versions (last tested in 2022)
  • Whether the threading approach reliably surfaces race conditions or if timing-dependent tests may be flaky

Package facts

LicenseBSD 3-Clause License permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAbandoned 1,529 days since the last release
Last repo commit
First released
Downloads792,803 / month, #5,044 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Evidence: pytest_race-0.2.0-py3-none-any.whl

Tags

Capabilities
pytest race condition testingconcurrent thread testingrace condition detectorpytest threading fixturemulti-threaded test runnerconcurrent test executionthread safety testing
Topics
concurrency-testingthread-safety

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest race condition testing”

  • pytest-raceProvides a pytest fixture that runs test functions concurrently in…
  • aiohappyeyeballsImplements Happy Eyeballs (RFC 8305) connection establishment for…
  • busypieProvides expressive, fluent API for busy-waiting in tests, allowing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.

Install it if you want to measure test completeness or enforce coverage thresholds in your project.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.

Install it if you write tests for any asyncio-based code.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.

Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also pytest-run-parallel · pytest-reraise · busypie · pytest-asyncio-concurrent · pytest-threadleak · pytest-httpbin · pytest-replay · pytest-runtime-xfail · pytest-fail-slow · cosmic-ray