[tox] envlist = cov_init, py{37,38,39}, cov_report, docs, bandit, pylint [testenv] basepython = py37: {env:TOXPYTHON:python3.7} py38: {env:TOXPYTHON:python3.8} py39: {env:TOXPYTHON:python3.9} {bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3} setenv = COVERAGE_FILE=.coverage.{envname} PYTHONPATH={toxinidir}:{toxinidir}/{{ cookiecutter.project_slug }} PYTHONUNBUFFERED=yes HOME={env:HOME:/tmp} passenv = COVERAGE_FILE PYTHONPATH PYTHONUNBUFFERED HOME skip_missing_interpreters = True alwayscopy = True deps = -r {toxinidir}/requirements/test.txt commands = pytest --durations 25 \ --basetemp={envtmpdir} \ --confcutdir=.. \ --cov \ -n 0 \ {posargs} [testenv:cov_init] deps = coverage skip_install = True commands = coverage erase [testenv:cov_report] deps = coverage skip_install = True commands = coverage combine coverage html {toxinidir}/docs/source/coverage/extract_source.py [testenv:lint] deps = pre-commit twine ignore_errors = True commands = twine check {distdir}/* pre-commit run --all-files [testenv:pur] deps = pur skip_install = True description = Update all versioned packages in requirements.txt files commands = pur -r requirements-all.txt [testenv:pylint] deps = pylint==1.9.4; python_version >= "2.7" and python_version < "3.0" pylint; python_version >= "3.4" pylint-fail-under skip_install = True commands = pylint-fail-under --rcfile=.pylintrc --fail_under 9.5 {{ cookiecutter.project_slug }} [testenv:bandit] deps = bandit skip_install = True commands = bandit -r {{ cookiecutter.project_slug }} [testenv:docs] deps = -r {toxinidir}/requirements/dev.txt skip_install = True description = Invoke sphinx-build to build the HTML docs commands = sphinx-build -b linkcheck sphinx-build -b html -q {posargs}