-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
89 lines (79 loc) · 1.66 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
88
89
;;;;;;;;;;;;;;;;;;;;;;
; Options for pytest ;
;;;;;;;;;;;;;;;;;;;;;;
[pytest]
minversion = 3.9
testpaths = tests
addopts = --strict -v
xfail_strict = true
markers =
smoke
;;;;;;;;;;;;;;;;;;;;;;
; Options for flake8 ;
;;;;;;;;;;;;;;;;;;;;;;
[flake8]
max-line-length = 100
exclude = doc build ./.*
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Options for coverage.py ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
[coverage:run]
branch = true
[coverage:report]
show_missing = True
exclude_lines =
^if __name__ == ['"]__main__['"]:$
;;;;;;;;;;;;;;;;;;;;;;
; Misc configuration ;
;;;;;;;;;;;;;;;;;;;;;;
[main]
src_dir = valid8
docs_loc = {env:DOCS:html_docs}
;;;;;;;;;;;;;;;;;;;;;
; Tox configuration ;
;;;;;;;;;;;;;;;;;;;;;
[tox]
envlist = py36,py37
skip_missing_interpreters = True
[testenv]
passenv = SHELL
deps =
coverage
pytest
-rrequirements.txt
commands =
coverage erase
coverage run --source {[main]src_dir} -m pytest --junitxml=report_{envname}.xml {posargs}
coverage report
-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
pep8-naming
flake8-colors
commands = flake8 {[main]src_dir} tests/ setup.py
skip_install = True
[testenv:formatting]
deps = black
commands = black {posargs} {[main]src_dir} tests/
skip_install = True
[testenv:docs]
usedevelop = True
deps =
sphinx
sphinx_rtd_theme
m2r
sphinxcontrib-autoprogram
-rrequirements.txt
commands =
sphinx-apidoc -fMeT -o docs/api {[main]src_dir}
sphinx-build -av --color -b html docs {[main]docs_loc} {posargs}