Skip to content

Commit 7c42ece

Browse files
committed
tox: split default posargs in multiple env vars
This is required for combining. Use `PYTEST_ADDOPTS=--lsof` for a single job only (to cover LsofFdLeakChecker mainly) - any warnings are currently ignored anyway.
1 parent 55b78ff commit 7c42ece

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
- TOXENV=py27 PYTEST_COVERAGE=1
1616
# Specialized factors for py27.
1717
- TOXENV=py27-nobyte PYTEST_COVERAGE=1
18-
- TOXENV=py27-xdist PYTEST_COVERAGE=1
18+
- TOXENV=py27-xdist PYTEST_COVERAGE=1 PYTEST_ADDOPTS=--lsof
1919
- TOXENV=py27-pluggymaster-xdist
2020
# Specialized factors for py37.
2121
- TOXENV=py37-pexpect,py37-trial,py37-numpy

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ envlist =
2121

2222
[testenv]
2323
commands =
24-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS}}
24+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
2525
coverage: coverage combine
2626
coverage: coverage report
2727
passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS
2828
setenv =
29-
_PYTEST_TOX_DEFAULT_POSARGS=--lsof
29+
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_PEXPECT:} {env:_PYTEST_TOX_POSARGS_XDIST:}
3030

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

3838
pexpect: _PYTEST_TOX_PLATFORM=linux|darwin
39-
pexpect: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py}
39+
pexpect: _PYTEST_TOX_POSARGS_PEXPECT=testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py
4040

41-
xdist: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:-n auto}
41+
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
4242
extras = testing
4343
deps =
4444
pexpect: pexpect

0 commit comments

Comments
 (0)