Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox: split default posargs, use --lsof with single job only #4847

Merged
merged 2 commits into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- stage: baseline
env: TOXENV=py27-pexpect,py27-trial
- env: TOXENV=py37-numpy-xdist
- env: TOXENV=py37-lsof-numpy-xdist PYTEST_COVERAGE=1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that lsof is only used to cover the code for it (we do not react / handle its warnings anyway), this could also be done with a faster job for less overhead maybe.

- env: TOXENV=linting,docs,doctesting
python: '3.7'

Expand Down
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 @@ -37,10 +37,12 @@ setenv =

nobyte: PYTHONDONTWRITEBYTECODE=1

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 =
numpy: numpy
Expand Down