Skip to content

Commit

Permalink
update pytest dist value to loadgroup
Browse files Browse the repository at this point in the history
This option is much faster and easier to control the group of tests for same worker.
  • Loading branch information
CunliangGeng committed May 31, 2024
1 parent 41a58ce commit 3a92298
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 3a92298

Please sign in to comment.