-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
87 lines (74 loc) · 1.54 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
78
79
80
81
82
83
84
85
86
87
[tox]
envlist =
clean
mypy
py3{9,10,11,12}
coverage-html
skip_missing_interpreters = True
isolated_build = True
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv:clean]
deps =
coverage
setenv =
commands =
-coverage erase
[testenv:mypy]
deps =
mypy
commands =
mypy --ignore-missing-imports --follow-imports=skip src/
[testenv:flake8-critical]
setenv =
deps =
flake8
commands =
# stop the build if there are Python syntax errors or undefined names
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics src/
[testenv:coverage-html]
deps =
coverage
setenv =
commands =
-coverage combine --append
coverage html --omit="*/test*"
coverage html --include="./src/*" --omit="*/test*"
[testenv]
passenv = DATABASE_URL
deps =
pytest
pytest-cov
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
PYTHONPATH = {toxinidir}/src
PYTHONWARNINGS=once::DeprecationWarning
usedevelop = True
commands =
pytest -o junit_suite_name="{envname} unit tests" --cov={toxinidir}/src --cov-report=xml:reports/{envname}/coverage.xml --junitxml=reports/{envname}/unit-results.xml --verbose {posargs}
[coverage:run]
source = ./src/.
omit =
test*
[coverage:report]
skip_covered = true
exclude_lines =
# Ignore not abstract methods, as these cannot be tested
raise NotImplementedError
[coverage:paths]
source =
src
.tox/py*/**/site-packages
[flake8]
max-line-length = 88
filename =
src/*
extend_exclude =
*.egg-info,
*.html,
*.txt,