forked from recitale/recitale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
50 lines (43 loc) · 1.25 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
[tox]
envlist=check-manifest,flake8,black,bandit,pytest
[testenv:check-manifest]
skip_install = true
skipsdist = true
deps =
check-manifest
commands=
{envpython} -m check_manifest {toxinidir}
[testenv:flake8]
skip_install = true
deps =
flake8 >= 3.6
commands = flake8
[flake8]
format = pylint
ignore = W503, E203, E731, E231 # for black compatibility
max-line-length = 100
exclude = docs/*,.tox/*,.git/*
[testenv:black]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black --diff --check .
[testenv:black-run]
basepython = python3
skip_install = true
deps =
black >= 19.10b0
commands = black .
[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit
# B404:import_subprocess Severity: Low Confidence: High => recitale should avoid using subprocess but for now the code is shlex'ed so ~safe
# B603:subprocess_without_shell_equals_true Severity: Low Confidence: High => see B404
# B701:jinja2_autoescape_false Severity: High Confidence: High => including HTML code from settings.yaml is a feature of recitale though highly unsecure. TODO: Find much safer work-around
commands = bandit -s B404,B603,B701 -r recitale
[testenv:pytest]
extras = tests
commands = pytest --cov={envsitepackagesdir}/recitale/ --cov-report=xml