-
Notifications
You must be signed in to change notification settings - Fork 955
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Tox configuration, run Travis builds with Tox
- Loading branch information
Showing
5 changed files
with
189 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
*.pyc | ||
*.pyo | ||
__pycache__ | ||
|
||
.pytest_cache | ||
|
||
*.wpu | ||
|
||
*.bak | ||
|
||
dist | ||
build | ||
*.egg-info | ||
*.py[co] | ||
__pycache__/ | ||
|
||
.tox/ | ||
.pytest_cache/ | ||
|
||
dist/ | ||
build/ | ||
*.egg-info/ | ||
|
||
*.bak | ||
|
||
*.wpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# tox (https://tox.readthedocs.io/) is a tool for running tests | ||
# Run tests in multiple virtualenvs. | ||
|
||
[tox] | ||
envlist = | ||
flake8 | ||
pylint | ||
bandit | ||
py{27,34,35,36,37,38,py,py3} | ||
readme | ||
requirements | ||
clean | ||
|
||
[testenv] | ||
description = Unit tests | ||
deps = | ||
pytest | ||
python_toolbox | ||
commands = pytest | ||
setenv = | ||
# until python_toolbox is fixed | ||
PYTHONWARNINGS = ignore::DeprecationWarning | ||
|
||
[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] | ||
addopts = --strict --verbose |