2019-04-23 17:30:21 +00:00
|
|
|
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
|
|
|
# Run tests in multiple virtualenvs.
|
|
|
|
|
|
|
|
[tox]
|
|
|
|
envlist =
|
|
|
|
flake8
|
|
|
|
pylint
|
|
|
|
bandit
|
2020-05-27 17:37:52 +00:00
|
|
|
py{27,34,35,36,37,38,39,py,py3}
|
2019-04-23 17:30:21 +00:00
|
|
|
readme
|
|
|
|
requirements
|
|
|
|
clean
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
description = Unit tests
|
|
|
|
deps =
|
|
|
|
pytest
|
|
|
|
commands = pytest
|
|
|
|
|
|
|
|
[testenv:bandit]
|
|
|
|
description = PyCQA security linter
|
|
|
|
deps = bandit
|
|
|
|
commands = bandit -r --ini tox.ini
|
|
|
|
|
|
|
|
[testenv:clean]
|
|
|
|
description = Clean up bytecode
|
|
|
|
deps = pyclean
|
|
|
|
commands = py3clean -v {toxinidir}
|
|
|
|
|
|
|
|
[testenv:flake8]
|
|
|
|
description = Static code analysis and code style
|
|
|
|
deps = flake8
|
|
|
|
commands = flake8
|
|
|
|
|
|
|
|
[testenv:pylint]
|
|
|
|
description = Check for errors and code smells
|
|
|
|
deps = pylint
|
|
|
|
commands = pylint pysnooper setup
|
|
|
|
|
|
|
|
[testenv:readme]
|
|
|
|
description = Ensure README renders on PyPI
|
|
|
|
deps = twine
|
|
|
|
commands =
|
|
|
|
{envpython} setup.py -q sdist bdist_wheel
|
|
|
|
twine check dist/*
|
|
|
|
|
|
|
|
[testenv:requirements]
|
|
|
|
description = Update requirements.txt
|
|
|
|
deps = pip-tools
|
|
|
|
commands = pip-compile --output-file requirements.txt requirements.in
|
|
|
|
changedir = {toxinidir}
|
|
|
|
|
|
|
|
[bandit]
|
|
|
|
exclude = .tox,build,dist,tests
|
|
|
|
targets = .
|
|
|
|
|
|
|
|
[flake8]
|
|
|
|
exclude = .tox,build,dist,pysnooper.egg-info
|
|
|
|
|
|
|
|
[pytest]
|
2019-04-24 09:42:12 +00:00
|
|
|
addopts = --strict
|