tox: move doctesting into main testenv
This allows for `tox -e doctesting-coverage`, which would otherwise not use the "doctesting" testenv.
This commit is contained in:
parent
0f78ef8e02
commit
ef294fc727
16
tox.ini
16
tox.ini
|
@ -20,11 +20,12 @@ envlist =
|
||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
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:}}
|
||||||
|
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
|
||||||
coverage: coverage combine
|
coverage: coverage combine
|
||||||
coverage: coverage report -m
|
coverage: coverage report -m
|
||||||
passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS TERM
|
passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS TERM
|
||||||
setenv =
|
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.
|
# Configuration to run with coverage similar to CI, e.g.
|
||||||
# "tox -e py37-coverage".
|
# "tox -e py37-coverage".
|
||||||
|
@ -33,6 +34,8 @@ setenv =
|
||||||
coverage: COVERAGE_FILE={toxinidir}/.coverage
|
coverage: COVERAGE_FILE={toxinidir}/.coverage
|
||||||
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
|
||||||
|
|
||||||
|
doctesting: _PYTEST_TOX_POSARGS_DOCTESTING=doc/en
|
||||||
|
|
||||||
nobyte: PYTHONDONTWRITEBYTECODE=1
|
nobyte: PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof
|
lsof: _PYTEST_TOX_POSARGS_LSOF=--lsof
|
||||||
|
@ -40,6 +43,7 @@ setenv =
|
||||||
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
|
xdist: _PYTEST_TOX_POSARGS_XDIST=-n auto
|
||||||
extras = testing
|
extras = testing
|
||||||
deps =
|
deps =
|
||||||
|
doctesting: PyYAML
|
||||||
oldattrs: attrs==17.4.0
|
oldattrs: attrs==17.4.0
|
||||||
oldattrs: hypothesis<=4.38.1
|
oldattrs: hypothesis<=4.38.1
|
||||||
numpy: numpy
|
numpy: numpy
|
||||||
|
@ -90,16 +94,6 @@ deps = -r{toxinidir}/doc/en/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -W -q --keep-going -b linkcheck . _build
|
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]
|
[testenv:regen]
|
||||||
changedir = doc/en
|
changedir = doc/en
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
Loading…
Reference in New Issue