From 6d9c3102bccf1259f1193b4020e53bca6a166be9 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Sat, 17 Oct 2026 09:05:16 +0200 Subject: [PATCH] Distribute tests between workers with worksteal Distribute tests with worksteal rather than loadfile so that a single slow file no longer determines the wall time of the run. --- docs/changes/newsfragments/xxxx.underthehood | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 docs/changes/newsfragments/xxxx.underthehood diff --git a/docs/changes/newsfragments/xxxx.underthehood b/docs/changes/newsfragments/xxxx.underthehood new file mode 100644 index 00000000000..075f2b044e5 --- /dev/null +++ b/docs/changes/newsfragments/xxxx.underthehood @@ -0,0 +1,3 @@ +Tests are now distributed between pytest-xdist workers using ``worksteal`` rather than +``loadfile``, so that a single slow test file no longer determines the duration of the +test run. diff --git a/pyproject.toml b/pyproject.toml index 700f2bde59d..51ab2553ccd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -213,7 +213,7 @@ reportUnnecessaryContains = "none" [tool.pytest.ini_options] minversion = "7.2" testpaths = "tests" -addopts = "-n auto --dist=loadfile --cov-config=pyproject.toml" +addopts = "-n auto --dist=worksteal --cov-config=pyproject.toml" asyncio_default_fixture_loop_scope = "function" markers = "serial"