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 `PYTEST_ADDOPTS=--lsof` for a single job only (to cover
LsofFdLeakChecker mainly) - any warnings are currently ignored anyway.
  • Loading branch information
blueyed committed Feb 28, 2019
1 parent 55b78ff commit 7c42ece
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
- TOXENV=py27 PYTEST_COVERAGE=1
# Specialized factors for py27.
- TOXENV=py27-nobyte PYTEST_COVERAGE=1
- TOXENV=py27-xdist PYTEST_COVERAGE=1
- TOXENV=py27-xdist PYTEST_COVERAGE=1 PYTEST_ADDOPTS=--lsof
- TOXENV=py27-pluggymaster-xdist
# Specialized factors for py37.
- TOXENV=py37-pexpect,py37-trial,py37-numpy
Expand Down
8 changes: 4 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_PEXPECT:} {env:_PYTEST_TOX_POSARGS_XDIST:}

# Configuration to run with coverage similar to Travis/Appveyor, e.g.
# "tox -e py37-coverage".
Expand All @@ -36,9 +36,9 @@ setenv =
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc

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 7c42ece

Please sign in to comment.