-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
77 lines (66 loc) · 1.59 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[tox]
envlist = py36,
py37,
py38,
py39,
linters,
coverage
[travis]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39, linters
###
# Base - run some tests
###
[testenv]
whitelist_externals = bash
mv
deps = nose2
cov-core
fauxfactory
usedevelop = true
commands = bash -c "if [ ! -d .coverage_data ]; then mkdir .coverage_data; fi"
coverage run -a --rcfile={toxinidir}/.coveragerc -m nose2 -v
mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname}
###
# Test Coverage
###
[testenv:coverage]
deps = cov-core
skip_install = true
commands = bash -c "if [ -d .coverage_data ]; then coverage combine .coverage_data ; rmdir .coverage_data ; fi"
coverage report --rcfile={toxinidir}/.coveragerc
###
# Code Quality
###
[testenv:linters]
deps = {[testenv:pylint]deps}
{[testenv:flake8]deps}
{[testenv:bandit]deps}
commands: {[testenv:pylint]commands}
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:pylint]
deps = pyflakes
pylint
commands = pylint --reports=n --rcfile={toxinidir}/pylint.rc filtration/
[testenv:flake8]
deps = flake8
flake8-quotes
flake8-import-order
skip_install = true
commands = flake8 filtration/
[flake8]
# max-complexity = 15
ignore = E731
inline-quotes = "
exclude = .coverage_data,.tox,dist
max-line-length = 99
import-order-style = smarkets
application-import-names = filtration
[testenv:bandit]
deps = bandit
skip_install = true
commands = bandit -r -c {toxinidir}/.bandit.yml filtration/