[tox]
envlist = black, flake8, pylint, yamllint, py36, py38
skip_missing_interpreters = True
[testenv]
changedir = {toxinidir}/tests
deps =
-r{toxinidir}/requirements.txt
pytest-cov==2.8.1
pytest==5.3.1
commands =
pytest \
--log-level=DEBUG \
--durations=5 \
--cov=libnmstate \
--cov=nmstatectl \
--cov-report=term \
--cov-report=xml \
--cov-report=html:htmlcov-{envname} \
{posargs} \
lib \
ctl
[testenv:black]
skip_install = true
basepython = python3.6
changedir = {toxinidir}
deps =
black==20.8b1
# style configured via pyproject.toml
commands =
black \
--check \
--diff \
{posargs} \
./
[testenv:pylint]
basepython = python3.6
sitepackages = true
skip_install = true
changedir = {toxinidir}
deps =
pylint==2.4.4
commands =
pylint \
--errors-only \
{posargs} \
libnmstate \
nmstatectl \
tests/lib \
tests/ctl \
tests/integration \
setup.py
[testenv:flake8]
basepython = python3.6
skip_install = true
changedir = {toxinidir}
deps =
flake8==3.7.9
commands =
flake8 \
--statistics {posargs} \
libnmstate/ \
nmstatectl/ \
tests/ \
setup.py
[testenv:yamllint]
basepython = python3.6
skip_install = true
changedir = {toxinidir}
deps =
yamllint==1.23.0
commands =
yamllint libnmstate/schemas/ examples/
[pytest]
addopts = -rxs
[flake8]
show_source = True