Use pytest-xdist to run pytest in parallel
mkoeppe opened this issue · 16 comments
(from #33546 comment:13 - #33546 comment:20)
Use https://github.com/pytest-dev/pytest-xdist to run pytest in parallel.
CC: @tobiasdiez
Component: doctest framework
Author: Tobias Diez
Branch/Commit: a2e396b
Reviewer: Dima Pasechnik, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/33825
Branch: public/build/pytest-xdist
New commits:
4290b11 | Add pytest-xdist package |
Commit: 4290b11
Changed dependencies from #33546 to none
Description changed:
---
+++
@@ -1,5 +1,5 @@
(from [#33546 comment:13](https://github.com/sagemath/sage/issues/33546#comment:13) - [#33546 comment:20](https://github.com/sagemath/sage/issues/33546#comment:20))
-Use https://pypi.org/project/pytest-parallel/ (`--workers`) or https://github.com/pytest-dev/pytest-xdist to run pytest in parallel.
+Use https://github.com/pytest-dev/pytest-xdist to run pytest in parallel.
Author: Tobias Diez
Reviewer: Dima Pasechnik
lgtm
That was quick, thanks!
All packages that appear as requirements for which we have an entry in build/pkgs/ should be listed in dependencies. This is to avoid races
[pytest_xdist] Requirement already satisfied: pytest>=6.2.0 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (7.1.2)
[pytest_xdist] Requirement already satisfied: pluggy<2.0,>=0.12 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (1.0.0)
[pytest_xdist] Requirement already satisfied: py>=1.8.2 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (1.10.0)
[pytest_xdist] Requirement already satisfied: iniconfig in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (1.1.1)
[pytest_xdist] Requirement already satisfied: attrs>=19.2.0 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (21.2.0)
[pytest_xdist] Requirement already satisfied: tomli>=1.0.0 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (1.2.1)
[pytest_xdist] Requirement already satisfied: packaging in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (21.3)
[pytest_xdist] Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Users/mkoeppe/s/sage/sage-rebasing/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages (from packaging->pytest>=6.2.0->pytest-xdist->-r /Users/mkoeppe/s/sage/sage-rebasing/build/pkgs/pytest_xdist/requirements.txt (line 1)) (3.0.6)
Changed reviewer from Dima Pasechnik to Dima Pasechnik, Matthias Koeppe
Thanks for adding the deps.
Changed branch from public/build/pytest-xdist to a2e396b