From 3c92bb0065a78f9865b6c67747b74ed8a6236429 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 25 Jun 2026 12:06:16 +0200 Subject: [PATCH] build(test): add pytest-xdist for parallel test execution Add `pytest-xdist` to test dependencies and configure 3 parallel workers via `addopts`. Testing showed that 4 or more workers does not provide measurable benefits. See https://pytest-xdist.readthedocs.io/en/stable/ Co-Authored-By: Claude Signed-off-by: Christian Heimes --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index adf93290e..0235c1351 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ mypy = [ test = [ "coverage[toml]!=4.4,>=4.0", "pytest", + "pytest-xdist", "requests-mock", "spdx-tools", "twine>=6.1.0", @@ -293,6 +294,8 @@ features = ["docs"] build = "sphinx-build -M html docs docs/_build -j auto --keep-going {args:--fail-on-warning --fresh-env -n}" [tool.pytest.ini_options] +# run tests in parallel with 3 pytest-xdist workers +addopts = "-n 3" markers = [ "network: test that need network access", ]