[tox] envlist = cov_init, py{27,35,36,37}, cov_report, docs, bandit, pylint [testenv] basepython = py27: {env:TOXPYTHON:python2.7} py35: {env:TOXPYTHON:python3.5} py36: {env:TOXPYTHON:python3.6} py37: {env:TOXPYTHON:python3.7} {bandit,cov_init,cov_report,docs,lint,pur,pylint}: {env:TOXPYTHON:python3} setenv = COVERAGE_FILE = .coverage.{envname} PYTHONPATH={toxinidir} PYTHONUNBUFFERED=yes HOME={env:HOME:/tmp} skip_missing_interpreters = True alwayscopy = True deps = -r {toxinidir}/requirements-all.txt commands = pytest --durations 25 \ --basetemp={envtmpdir} \ --confcutdir=.. \ --cov \ -n 0 \ {posargs} [testenv:cov_init] setenv = COVERAGE_FILE = .coverage PYTHONPATH={toxinidir} PYTHONUNBUFFERED=yes HOME={env:HOME:/tmp} deps = coverage skip_install = True commands = coverage erase [testenv:cov_report] setenv = COVERAGE_FILE = .coverage PYTHONPATH={toxinidir} PYTHONUNBUFFERED=yes HOME={env:HOME:/tmp} deps = beautifulsoup4 coverage skip_install = True commands = coverage combine # coverage report coverage html {toxinidir}/docs/source/coverage/extract_source.py [testenv:lint] setenv = {[testenv]setenv} deps = -r {toxinidir}/requirements-dev.txt ignore_errors = True commands = twine check {distdir}/* pre-commit run --all-files [testenv:pur] skip_install = True description = Update all versioned packages in requirements.txt files setenv = {[testenv]setenv} deps = pur commands = pur -r requirements-all.txt [testenv:pylint] skip_install = True setenv = {[testenv]setenv} deps = -r {toxinidir}/requirements-dev.txt commands = pylint --rcfile=.pylintrc shm_dict [testenv:bandit] skip_install = True setenv = {[testenv]setenv} deps = bandit commands = bandit -r shm_dict [testenv:docs] setenv = {[testenv]setenv} skip_install = True description = Invoke sphinx-build to build the HTML docs deps = -r {toxinidir}/requirements-all.txt commands = python setup.py build_sphinx -q {posargs}