tox: split default posargs in multiple env vars

This is required for combining.

Use it for new lsof facor also.
This commit is contained in:
Daniel Hahler 2019-02-27 13:10:42 +01:00
parent 0dd4cb0f8f
commit f0d7773ffa
1 changed files with 7 additions and 5 deletions

12
tox.ini
View File

@ -21,12 +21,12 @@ envlist =
[testenv]
commands =
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS}}
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
coverage: coverage combine
coverage: coverage report
passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS
setenv =
_PYTEST_TOX_DEFAULT_POSARGS=--lsof
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_PEXPECT:} {env:_PYTEST_TOX_POSARGS_XDIST:}
# Configuration to run with coverage similar to Travis/Appveyor, e.g.
# "tox -e py37-coverage".
@ -37,10 +37,12 @@ setenv =
nobyte: PYTHONDONTWRITEBYTECODE=1
pexpect: _PYTEST_TOX_PLATFORM=linux|darwin
pexpect: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py}
lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof
xdist: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:-n auto}
pexpect: _PYTEST_TOX_PLATFORM=linux|darwin
pexpect: _PYTEST_TOX_POSARGS_PEXPECT=testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
extras = testing
deps =
numpy: numpy