tox: add generic xdist factor
Cherry-picked from features. Conflicts: tox.ini
This commit is contained in:
parent
6fb7269979
commit
71373b04b0
21
tox.ini
21
tox.ini
|
@ -20,19 +20,22 @@ envlist =
|
|||
|
||||
[testenv]
|
||||
commands =
|
||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs}
|
||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {env:_PYTEST_TOX_ARGS:} {posargs}
|
||||
coverage: coverage combine
|
||||
coverage: coverage report
|
||||
passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS
|
||||
setenv =
|
||||
_PYTEST_TOX_ARGS=--lsof
|
||||
# Configuration to run with coverage similar to Travis/Appveyor, e.g.
|
||||
# "tox -e py37-coverage".
|
||||
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m
|
||||
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
|
||||
coverage: COVERAGE_FILE={toxinidir}/.coverage
|
||||
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
||||
xdist: _PYTEST_TOX_ARGS={env:_PYTEST_TOX_ARGS:-n auto}
|
||||
extras = testing
|
||||
deps =
|
||||
xdist: pytest-xdist>=1.13
|
||||
{env:_PYTEST_TOX_EXTRA_DEP:}
|
||||
|
||||
[testenv:py27-subprocess]
|
||||
|
@ -50,22 +53,6 @@ basepython = python3
|
|||
deps = pre-commit>=1.11.0
|
||||
commands = pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
[testenv:py27-xdist]
|
||||
extras = testing
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
pytest-xdist>=1.13
|
||||
commands =
|
||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto {posargs}
|
||||
|
||||
[testenv:py37-xdist]
|
||||
# NOTE: copied from above due to https://github.com/tox-dev/tox/issues/706.
|
||||
extras = testing
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
pytest-xdist>=1.13
|
||||
commands = {[testenv:py27-xdist]commands}
|
||||
|
||||
[testenv:py27-pexpect]
|
||||
platform = linux|darwin
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue