Metadata-Version: 2.4
Name: joshuarli-pytest-parallel
Version: 0.2.0
Summary: Small static-sharding parallel runner for pytest
Keywords: pytest
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Testing
Requires-Dist: pytest>=9.0
Requires-Python: >=3.13
Project-URL: Repository, https://github.com/joshuarli/pytest-parallel
Description-Content-Type: text/markdown

# pytest-parallel

A small pytest plugin for static process-level sharding.

```bash
pytest
```

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

```bash
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`.
