-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtox.ini
More file actions
45 lines (39 loc) · 1.07 KB
/
tox.ini
File metadata and controls
45 lines (39 loc) · 1.07 KB
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
[tox]
envlist = units, slow_units, flask, coverage
files_to_check = first tests
skip_missing_interpreters = true
basepython = python3.11
[base]
deps = -r{toxinidir}/dev-requirements.txt
-r{toxinidir}/requirements.txt
[testenv:flask]
deps = {[base]deps}
commands =
flask: flask --app first.web_server run --debug --no-reload --host localhost
[testenv:units]
deps = {[base]deps}
commands=
mypy --check-untyped-defs first
python -m pytest -m "not slow" tests
[testenv:slow_units]
deps = {[base]deps}
commands=
mypy --check-untyped-defs first
python -m pytest \
--cov=first \
--cov-config {toxinidir}/.coveragerc \
--no-cov-on-fail \
--cov-branch \
--cov-report=term-missing \
tests -- {posargs}
[testenv:checks]
deps = {[base]deps}
commands =
pylint {[tox]files_to_check}
pflake8 {[tox]files_to_check}
mypy {[tox]files_to_check}
bandit -r first
[testenv:coverage]
commands =
# Generate xml report based on previous run coverage data
coverage xml --rcfile={toxinidir}/.coveragerc -o coverage.xml