Skip to content

Commit

Permalink
tox: split default posargs in multiple env vars
Browse files Browse the repository at this point in the history
This is required for combining.

Use it for new lsof facor also.
  • Loading branch information
blueyed committed Feb 27, 2019
1 parent e711a6c commit 1d21a3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand All @@ -35,10 +35,12 @@ setenv =
coverage: COVERAGE_FILE={toxinidir}/.coverage
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc

lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof

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}
pexpect: _PYTEST_TOX_POSARGS_PEXPECT=testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py

xdist: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:-n auto}
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
extras = testing
deps =
pexpect: pexpect
Expand Down

0 comments on commit 1d21a3a

Please sign in to comment.