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.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for joshuarli_pytest_parallel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee04052b812c3e29feeb7c096d9b73176e16fe24360a50dbf4b62bd75e7687ff
MD5 7ecb49a744de5d380af1b21194de9ab7
BLAKE2b-256 347c4cbb6df621a3d74fd1e279f8c11314570568564d0d333ce0334ba66e8ad5

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