--- id: pytest-xdist version: "3.8.0" license: MIT license_treatment: permissive maintenance: active --- # pytest-xdist — pytest xdist plugin for distributed testing, most importantly across multiple CPUs License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install pytest-xdist uv add pytest-xdist poetry add pytest-xdist ## Description ============ 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 `__. ## AI interpretation — verify before relying pytest-xdist extends pytest to distribute test execution across multiple CPUs or machines, speeding up test suites by running tests in parallel. 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. [View on SkillFed](https://skillfed.io/packages/pytest-xdist) · [View on PyPI](https://pypi.org/project/pytest-xdist/)