forked from danilobellini/dose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
84 lines (77 loc) · 2.22 KB
/
tox.ini
File metadata and controls
84 lines (77 loc) · 2.22 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
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
[tox]
envlist = py{37,36,35,34,33,27},
py{37,27}-flake8
toxworkdir = /tmp/tox_dose
skip_missing_interpreters = True
[testenv]
deps =
pytest
setuptools
pytest-cov
commands =
; Can't run coverage directly with --cov=dose as it wouldn't
; cover anything (the imported files are the installed ones)
py.test --cov='{envsitepackagesdir}/dose' {posargs}
; Fix paths in the ".coverage" to be relative to the current directory
; instead of the installed one (on all platforms)
- python -c 'from coverage.data import PathAliases, CoverageData ; \
import os ; spd = os.path.abspath(r"{envsitepackagesdir}") ; \
pa = PathAliases() ; pa.add(spd, ".") ; \
old_cd = CoverageData() ; old_cd.read_file(".coverage") ; \
new_cd = CoverageData() ; new_cd.update(old_cd, pa) ; \
new_cd.write_file(".coverage")'
; Shows the code coverage report table
- coverage report --rcfile=tox.ini
[pytest]
addopts =
--cov-config=tox.ini
--cov-report=
[run]
branch = True
[report]
show_missing = True
precision = 2
[testenv:py37-flake8]
deps = flake8
commands =
- python -V
flake8
[testenv:py27-flake8]
deps = flake8
commands =
- python -V
flake8
[flake8]
exclude = dose/_legacy.py
max-complexity = 9
select =
; mccabe / pyflakes
; http://flake8.pycqa.org/en/latest/user/error-codes.html
; C901 McCabe complexity (enabled by the "max-complexity" option)
C,
; pyflakes: - future imports as the first statement
; - no star imports "from module import *"
; - no shadowed/undefined/duplicated/unused names
F,
; pycodestyle
; http://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
; Indentation with 4 spaces (don't check comments/continuation lines)
E111, E112, E113,
; Whitespace before "(" or missing after one of ",;:"
E211, E231,
; Too many blank lines
E303, E304,
; Line length > 79 or has a redundant line break backslash
E501, E502,
; Use "not in" and "is [not]"
E71,
; Avoid confusing single-char names "l"/"O"/"I"
E74,
; Actual errors (syntax, indentation, I/O)
E9,
; Trailing whitespace / empty lines
W2, W3,
; Deprecated stuff
W6,
; Tab character
E101, E223, E224, E242, E273, E274, W191