Add psutil extra and introduce pytest_xdist_auto_num_workers hook
This makes using psutil optional and opens up the possibility of customization through the pytest_xdist_auto_num_workers hook, making things like #477 possible. Fix #585
This commit is contained in:
16
tox.ini
16
tox.ini
@@ -3,9 +3,9 @@ envlist=
|
||||
linting
|
||||
py{35,36,37,38,39}-pytestlatest
|
||||
py38-pytestmaster
|
||||
py38-psutil
|
||||
|
||||
[testenv]
|
||||
passenv = USER USERNAME
|
||||
extras = testing
|
||||
deps =
|
||||
pytestlatest: pytest
|
||||
@@ -13,8 +13,16 @@ deps =
|
||||
commands=
|
||||
pytest {posargs}
|
||||
|
||||
[testenv:py38-psutil]
|
||||
extras =
|
||||
testing
|
||||
psutil
|
||||
deps = pytest
|
||||
commands =
|
||||
pytest {posargs:-k psutil}
|
||||
|
||||
[testenv:linting]
|
||||
skipsdist = True
|
||||
skip_install = True
|
||||
usedevelop = True
|
||||
deps =
|
||||
pre-commit
|
||||
@@ -28,9 +36,9 @@ skipsdist = True
|
||||
usedevelop = True
|
||||
passenv = *
|
||||
deps =
|
||||
towncrier
|
||||
towncrier
|
||||
commands =
|
||||
towncrier --version {posargs} --yes
|
||||
towncrier --version {posargs} --yes
|
||||
|
||||
[pytest]
|
||||
addopts = -ra
|
||||
|
||||
Reference in New Issue
Block a user