Skip to main content

Small static-sharding parallel runner for pytest

Project description

pytest-parallel

A small pytest plugin for static process-level sharding.

pytest

Parallel execution is enabled by default. The default job count is auto, using os.cpu_count().

pytest -j 4
pytest --jobs 4
pytest --serial

Model

pytest-parallel keeps the execution model intentionally plain:

  • collect once in the coordinator
  • group tests by file
  • assign files round-robin to fixed workers
  • run each worker in a separate multiprocessing process
  • report results through simple JSONL files

There is no work stealing, no execnet, no remote execution, and no scheduler protocol.

Platform Policy

  • macOS uses spawn
  • Linux uses fork
  • other platforms use spawn

The fork/spawn point is after collection and before coordinator result polling begins.

On Linux, pytest-parallel refuses to fork if any non-main thread is alive at that point. That catches plugins that start background threads during configure, session start, collection, or pytest_parallel_pre_spawn.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

joshuarli_pytest_parallel-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file joshuarli_pytest_parallel-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: joshuarli_pytest_parallel-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for joshuarli_pytest_parallel-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc017c83211220ff50326366462322ab04742ea0fecbe1f6efabde9d4d1cb1a
MD5 8ef40771ff69dec05550ba261e828b41
BLAKE2b-256 e54b2c3b285fc1eed48c5f7f79719efba4981f5be8d52979fba10981a645c6bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page