mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Count CPU cores via psutil for parallel testing
psutil does a much better job at accurately counting CPU cores, of which pytest-xdist takes advantage for the purposes of running tests concurrently.
This commit is contained in:
parent
c345268de6
commit
b454f76f72
3 changed files with 3 additions and 2 deletions
|
|
@ -49,6 +49,7 @@ typogrify = "^2.0"
|
||||||
sphinx = "^3.0"
|
sphinx = "^3.0"
|
||||||
sphinx_rtd_theme = "^0.5"
|
sphinx_rtd_theme = "^0.5"
|
||||||
livereload = "^2.6"
|
livereload = "^2.6"
|
||||||
|
psutil = {version = "^5.7", optional = true}
|
||||||
pytest = "^6.0"
|
pytest = "^6.0"
|
||||||
pytest-cov = "^2.8"
|
pytest-cov = "^2.8"
|
||||||
pytest-pythonpath = "^0.7.3"
|
pytest-pythonpath = "^0.7.3"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Pygments==2.6.1
|
Pygments==2.6.1
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-xdist
|
pytest-xdist[psutil]
|
||||||
|
|
||||||
# Optional Packages
|
# Optional Packages
|
||||||
Markdown >= 3.1
|
Markdown >= 3.1
|
||||||
|
|
|
||||||
2
tasks.py
2
tasks.py
|
|
@ -14,7 +14,7 @@ VENV_PATH = Path(ACTIVE_VENV) if ACTIVE_VENV else (VENV_HOME / PKG_NAME)
|
||||||
VENV = str(VENV_PATH.expanduser())
|
VENV = str(VENV_PATH.expanduser())
|
||||||
VENV_BIN = Path(VENV) / Path(BIN_DIR)
|
VENV_BIN = Path(VENV) / Path(BIN_DIR)
|
||||||
|
|
||||||
TOOLS = ["poetry", "pre-commit"]
|
TOOLS = ["poetry", "pre-commit", "psutil"]
|
||||||
POETRY = which("poetry") if which("poetry") else (VENV_BIN / "poetry")
|
POETRY = which("poetry") if which("poetry") else (VENV_BIN / "poetry")
|
||||||
PRECOMMIT = (
|
PRECOMMIT = (
|
||||||
which("pre-commit") if which("pre-commit") else (VENV_BIN / "pre-commit")
|
which("pre-commit") if which("pre-commit") else (VENV_BIN / "pre-commit")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue