Skip to content

Commit 0a746d5

Browse files
committed
-
1 parent f6d286a commit 0a746d5

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

tox.ini

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# tox (https://tox.readthedocs.io/) is a tool for running tests
2+
# Run tests in multiple virtualenvs.
3+
4+
[tox]
5+
envlist =
6+
flake8
7+
pylint
8+
bandit
9+
py{36,37,38,py,py3}
10+
readme
11+
requirements
12+
clean
13+
14+
[testenv]
15+
description = Unit tests
16+
deps =
17+
pytest
18+
commands = pytest
19+
20+
[testenv:bandit]
21+
description = PyCQA security linter
22+
deps = bandit
23+
commands = bandit -r --ini tox.ini
24+
25+
[testenv:clean]
26+
description = Clean up bytecode
27+
deps = pyclean
28+
commands = py3clean -v {toxinidir}
29+
30+
[testenv:flake8]
31+
description = Static code analysis and code style
32+
deps = flake8
33+
commands = flake8
34+
35+
[testenv:pylint]
36+
description = Check for errors and code smells
37+
deps = pylint
38+
commands = pylint python_toolbox setup
39+
40+
[testenv:readme]
41+
description = Ensure README renders on PyPI
42+
deps = twine
43+
commands =
44+
{envpython} setup.py -q sdist bdist_wheel
45+
twine check dist/*
46+
47+
[testenv:requirements]
48+
description = Update requirements.txt
49+
deps = pip-tools
50+
commands = pip-compile --output-file requirements.txt requirements.in
51+
changedir = {toxinidir}
52+
53+
[bandit]
54+
exclude = .tox,build,dist,tests
55+
targets = .
56+
57+
[flake8]
58+
exclude = .tox,build,dist,python_toolbox.egg-info
59+
60+
[pytest]
61+
addopts = --strict

0 commit comments

Comments
 (0)