Skip to content

Commit

Permalink
Try using loadscope pytest-xdist test distribution method to see if this
Browse files Browse the repository at this point in the history
helps with a weird race we started to see more often with latest version
of pytest.
  • Loading branch information
Kami committed Apr 15, 2024
1 parent 7fa07c4 commit 20ae731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ setenv =
# NOTE: By default we run tests on CI in parallel to speed up the build
# To avoid per-test function process safety issues we run all tests in a single
# file in the same worker process.
# for pytest-xdist, we want to distribute tests by file aka --dist loadfile
# for pytest-xdist, we want to distribute tests by file (class + method) aka --dist loadscope
commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py
pytest --color=yes -rsx -vvv --capture=tee-sys -o log_cli=True --durations=10 --timeout=15 -n auto --dist loadfile --ignore libcloud/test/benchmarks/ --ignore-glob "*test_list_objects_filtering_performance*"
pytest --color=yes -rsx -vvv --capture=tee-sys -o log_cli=True --durations=10 --timeout=15 -n auto --dist loadscope --ignore libcloud/test/benchmarks/ --ignore-glob "*test_list_objects_filtering_performance*"

[testenv:py3.8-dist]
# Verify library installs without any dependencies when using python setup.py
Expand Down

0 comments on commit 20ae731

Please sign in to comment.