-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
75 lines (64 loc) · 1.39 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
[tox]
envlist = py36,py37
skip_missing_interpreters = True
[testenv]
deps =
coverage
pytest
-rrequirements.txt
commands =
coverage erase
coverage run --source {[main]src_dir} -m pytest --junitxml=report_{envname}.xml {posargs}
coverage report -m
coverage html
# Tests only (no coverage)
# requires explicit call: tox -e pytest
[testenv:pytest]
deps =
pytest
pytest-sugar
-rrequirements.txt
commands = pytest {posargs}
usedevelop = True
[testenv:lint]
deps = flake8
commands = flake8 {[main]src_dir} tests/
skip_install = True
[testenv:formatting]
deps = black
commands = black .
skip_install = True
[testenv:docs]
usedevelop = True
deps =
sphinx
sphinx_rtd_theme
; use :mdinclude directives (also in conf.py)
m2r
; ; uncomment below to use .. :autoprogram: directives (also in conf.py)
; sphinxcontrib-autoprogram
-rrequirements.txt
commands =
sphinx-apidoc -fMeT -o docs/api {[main]src_dir}
sphinx-build -av --color -b html docs docs/_build {posargs}
;;;;;;;;;;;;;;;;;;;;;;;;
; Configuration values ;
;;;;;;;;;;;;;;;;;;;;;;;;
[main]
src_dir = my_package
[pytest]
minversion = 3.9
testpaths = tests
addopts = --strict -v
xfail_strict = true
markers =
smoke
[flake8]
max-line-length = 100
exclude = docs ./.*
[coverage:run]
branch = true
[coverage:report]
show_missing = True
exclude_lines =
^if __name__ == ['"]__main__['"]:$