Registry /
testing / pytest-xdist-worker-stats
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.5MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.8s · import 0.000s · 32MB
30MB installed
● package 30MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pytest-xdist-worker-stats
✓ No direct import needed; pytest discovers plugins automatically.
Pytest plugins are designed for automatic discovery by pytest itself. Users typically do not need to import anything directly from 'pytest-xdist-worker-stats' in their test files or conftest.py.
This quickstart demonstrates how to use `pytest-xdist-worker-stats` by creating a simple test file with parameterized tests that will be run in parallel by `pytest-xdist`. The `--xdist-worker-stats` flag will activate the plugin and display the worker statistics after the test run.
import time
import pytest
@pytest.mark.parametrize("i", range(5))
def test_slow_task_a(i):
time.sleep(0.1)
@pytest.mark.parametrize("i", range(3))
def test_slow_task_b(i):
time.sleep(0.2)
# To run: save this as test_example.py, then run from your terminal:
# pip install pytest pytest-xdist pytest-xdist-worker-stats
# pytest -n 2 --xdist-worker-stats test_example.py
Debug
Known issues
gotchaThis plugin requires `pytest-xdist` to be installed and active (by using the `-n` flag with pytest) to function correctly. Without `pytest-xdist`, there are no parallel workers to report statistics for.fixEnsure `pip install pytest-xdist` is executed and pytest is run with a parallelization flag, e.g., `pytest -n auto`.
affects: All
gotchaThe worker statistics are only displayed when the `--xdist-worker-stats` command-line flag is explicitly used with pytest. Simply installing the plugin is not enough.fixAlways include `--xdist-worker-stats` in your pytest command, e.g., `pytest -n auto --xdist-worker-stats`.
affects: All
breakingVersion 0.4.0 introduces support for Pytest 9. Older versions of `pytest-xdist-worker-stats` may not be compatible with Pytest 9, and conversely, newer versions might introduce incompatibilities with significantly older Pytest versions (e.g., Pytest 7 or earlier).fixAlways keep `pytest-xdist-worker-stats` updated alongside `pytest` and `pytest-xdist` to ensure compatibility. Check release notes for specific version requirements.
affects: <0.4.0 (with Pytest 9)
gotchaThe library requires Python 3.10 or newer. Running it with older Python versions will result in installation or runtime errors.fixEnsure your environment uses Python 3.10 or a more recent version. Consider using `pyenv` or `conda` to manage Python versions.
affects: All
Upgrade
Version history
0.4.0latest on PyPI · released Feb 16, 2026
Audit
Dependencies
pytestrequiredCore testing framework
pytest-xdistrequiredRequired for parallel test execution and worker management, which this plugin extends