From 3a92298dd435aaa1053dfce106b696adb3a7f12c Mon Sep 17 00:00:00 2001 From: Cunliang Geng Date: Thu, 30 May 2024 14:23:18 +0200 Subject: [PATCH] update pytest dist value to loadgroup This option is much faster and easier to control the group of tests for same worker. --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 15a0be6c..cd3a0bbb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,8 +87,10 @@ namespaces = true # enable data directory to be identified [tool.pytest.ini_options] minversion = "6.0" -# pytest options: -ra: show summary info for all test outcomes; -n auto: run tests in parallel; --dist loadscope: distribute tests by loading scope -addopts = "-ra -n auto --dist loadscope" +# -ra: show summary info for all test outcomes; +# -n auto: run tests in parallel; +# --dist loadgroup: sends tests marked with 'xdist_group' to the same worker +addopts = "-ra -n auto --dist loadgroup" testpaths = ["tests/unit"] [tool.coverage.run]