@@ -20,18 +20,21 @@ envlist =
20
20
21
21
[testenv]
22
22
commands =
23
- {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs}
23
+ {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {env:_PYTEST_TOX_ARGS:} {posargs}
24
24
coverage: coverage combine
25
25
coverage: coverage report
26
26
passenv = USER USERNAME COVERAGE_* TRAVIS
27
27
setenv =
28
+ _PYTEST_TOX_ARGS =--lsof
28
29
# configuration if a user runs tox with a "coverage" factor, for example "tox -e py37-coverage"
29
30
coverage: _PYTEST_TOX_COVERAGE_RUN =coverage run -m
30
31
coverage: _PYTEST_TOX_EXTRA_DEP =coverage-enable-subprocess
31
32
coverage: COVERAGE_FILE ={toxinidir}/.coverage
32
33
coverage: COVERAGE_PROCESS_START ={toxinidir}/.coveragerc
34
+ xdist: _PYTEST_TOX_ARGS ={env:_PYTEST_TOX_ARGS:-n auto}
33
35
extras = testing
34
36
deps =
37
+ xdist: pytest-xdist>=1.13
35
38
{env:_PYTEST_TOX_EXTRA_DEP:}
36
39
37
40
[testenv:py27-subprocess]
@@ -49,22 +52,6 @@ basepython = python3
49
52
deps = pre-commit>=1.11.0
50
53
commands = pre-commit run --all-files --show-diff-on-failure
51
54
52
- [testenv:py27-xdist]
53
- extras = testing
54
- deps =
55
- pytest-xdist>=1.13
56
- {env:_PYTEST_TOX_EXTRA_DEP:}
57
- commands =
58
- {env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto {posargs}
59
-
60
- [testenv:py37-xdist]
61
- # NOTE: copied from above due to https://github.com/tox-dev/tox/issues/706.
62
- extras = testing
63
- deps =
64
- pytest-xdist>=1.13
65
- {env:_PYTEST_TOX_EXTRA_DEP:}
66
- commands = {[testenv:py27-xdist]commands}
67
-
68
55
[testenv:py27-pexpect]
69
56
platform = linux|darwin
70
57
deps =
0 commit comments