Skip to content

Commit 90031ed

Browse files
authored
Merge pull request #4847 from blueyed/tox-posargs-lsof
tox: split default posargs, use --lsof with single job only
2 parents 0dd4cb0 + f8160f7 commit 90031ed

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
- stage: baseline
6767
env: TOXENV=py27-pexpect,py27-trial
68-
- env: TOXENV=py37-numpy-xdist
68+
- env: TOXENV=py37-lsof-numpy-xdist PYTEST_COVERAGE=1
6969
- env: TOXENV=linting,docs,doctesting
7070
python: '3.7'
7171

tox.ini

Lines changed: 6 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_LSOF:} {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".
@@ -37,10 +37,12 @@ setenv =
3737

3838
nobyte: PYTHONDONTWRITEBYTECODE=1
3939

40+
lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof
41+
4042
pexpect: _PYTEST_TOX_PLATFORM=linux|darwin
41-
pexpect: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py}
43+
pexpect: _PYTEST_TOX_POSARGS_PEXPECT=testing/test_pdb.py testing/test_terminal.py testing/test_unittest.py
4244

43-
xdist: _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_DEFAULT_POSARGS:-n auto}
45+
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
4446
extras = testing
4547
deps =
4648
numpy: numpy

0 commit comments

Comments
 (0)