skillfed

pytest-xdist

pytest xdist plugin for distributed testing, most importantly across multiple CPUs

pytest-xdist Permissive license MIT Active 1,894 v3.8.0 released

Install

pytest-xdist on PyPI

pip

pip install pytest-xdist

uv

uv add pytest-xdist

poetry

poetry add pytest-xdist

Package 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

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

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.
parallel test executiondistributed pytest testingpytest multi-cpuspeed up test suitepytest worker processespytest concurrencyhorizontal test scaling

Similar packages