pytest-xdist
pytest xdist plugin for distributed testing, most importantly across multiple CPUs
Install
pytest-xdist on PyPI
pip
pip install pytest-xdistuv
uv add pytest-xdistpoetry
poetry add pytest-xdistPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — execnet, pytest |
| Maintenance | actively maintained — 408 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pytest_xdist-3.8.0-py3-none-any.whl
About pytest-xdist
from the package's own PyPI description — quoted content, verbatim
============ pytest-xdist ============
.. image:: http://img.shields.io/pypi/v/pytest-xdist.svg :alt: PyPI version :target: https://pypi.python.org/pypi/pytest-xdist
.. image:: https://img.shields.io/conda/vn/conda-forge/pytest-xdist.svg :target: https://anaconda.org/conda-forge/pytest-xdist
.. image:: https://img.shields.io/pypi/pyversions/pytest-xdist.svg :alt: Python versions :target: https://pypi.python.org/pypi/pytest-xdist
.. image:: https://github.com/pytest-dev/pytest-xdist/workflows/test/badge.svg :target: https://github.com/pytest-dev/pytest-xdist/actions
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black
The pytest-xdist_ plugin extends pytest with new test execution modes, the most used being distributing
tests across multiple CPUs to speed up test execution::
pytest -n auto
With this call, pytest will spawn a number of workers processes equal to the number of available CPUs, and distribute the tests randomly across them.
Documentation
Documentation is available at Read The Docs <https://pytest-xdist.readthedocs.io>__.
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
pytest-xdist extends pytest to distribute test execution across multiple CPUs or machines, speeding up test suites by running tests in parallel.
Low friction installation with only two runtime dependencies (execnet and pytest). Actively maintained with recent releases and strong community engagement (1894 GitHub stars), supporting Python 3.9–3.13.
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal attribution requirements.
Usage
pip install pytest-xdist
pytest -n auto
Requires pytest to be installed; -n auto spawns workers equal to available CPU count.
Verdict: pytest-xdist is a mature, well-maintained testing utility in the top 1000 PyPI packages with no known vulnerabilities. Its permissive MIT license and low install friction make it a safe choice for teams seeking to parallelize test execution.
Needs verification
- Whether distributing tests across multiple machines (not just CPUs) requires additional setup beyond the basic -n flag.
- Performance characteristics and overhead when running on systems with very high CPU counts or in containerized environments.
Similar packages
permissive · top 1,000 on PyPI
pytest-json-ctrfpermissive · top 1,000 on PyPI
pytest-djangopermissive · top 1,000 on PyPI
py-cpuinfopermissive · top 1,000 on PyPI
execnetpermissive · top 1,000 on PyPI
celerypermissive · top 1,000 on PyPI
multiprocesspermissive · top 1,000 on PyPI
pytest-rerunfailurescopyleft · top 1,000 on PyPI
swebenchpermissive · top 1,000 on PyPI
tenacitypermissive · top 100 on PyPI