From ef294fc727f3e3f5e2718eec033d435f6ad798d9 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 22 Jan 2020 13:31:51 +0100 Subject: [PATCH] tox: move doctesting into main testenv This allows for `tox -e doctesting-coverage`, which would otherwise not use the "doctesting" testenv. --- tox.ini | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tox.ini b/tox.ini index 91c50ecec..707f239d0 100644 --- a/tox.ini +++ b/tox.ini @@ -20,11 +20,12 @@ envlist = [testenv] commands = {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} + doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest coverage: coverage combine coverage: coverage report -m passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS TERM setenv = - _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} + _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} # Configuration to run with coverage similar to CI, e.g. # "tox -e py37-coverage". @@ -33,6 +34,8 @@ setenv = coverage: COVERAGE_FILE={toxinidir}/.coverage coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc + doctesting: _PYTEST_TOX_POSARGS_DOCTESTING=doc/en + nobyte: PYTHONDONTWRITEBYTECODE=1 lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof @@ -40,6 +43,7 @@ setenv = xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto extras = testing deps = + doctesting: PyYAML oldattrs: attrs==17.4.0 oldattrs: hypothesis<=4.38.1 numpy: numpy @@ -90,16 +94,6 @@ deps = -r{toxinidir}/doc/en/requirements.txt commands = sphinx-build -W -q --keep-going -b linkcheck . _build -[testenv:doctesting] -basepython = python3 -skipsdist = True -deps = - {[testenv]deps} - PyYAML -commands = - {env:_PYTEST_TOX_COVERAGE_RUN:} pytest doc/en - {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest - [testenv:regen] changedir = doc/en skipsdist = True