-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
75 lines (65 loc) · 1.82 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 = style_guide, flake8, complexity, coverage, packages, doc, py27, py36
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following line:
; -r{toxinidir}/requirements.txt
commands =
pip install -U pip
py.test --basetemp={envtmpdir}
[flake8]
max-complexity = 10
import-order-style = pep8
exclude = .git, __pycache__, .tox, .eggs, *.egg, venv, venv-py27, backup, kursywalut/__init__.py
ignore = D200, D401, E501, W503, W606
[travis]
python =
3.6: py36
2.7: py27
[testenv:style_guide]
ignore_errors = true
skip_install = true
deps =
flake8
flake8-docstrings
flake8-import-order
flake8-todo
commands =
flake8 --select=E,W,I,T --tee --output-file=pep8_violations.txt --statistics --count setup.py kursywalut
flake8 --select=D --tee --output-file=pep257_violations.txt --statistics --count setup.py kursywalut
[testenv:flake8]
skip_install = true
basepython = python
deps = flake8
commands = flake8 kursywalut
[testenv:complexity]
skip_install = true
deps =
flake8
commands =
flake8 --select=C901 --tee --output-file=complexity.txt --count
[testenv:coverage]
basepython = python
setenv =
PYTHONPATH = {toxinidir}
deps =
pytest
pytest-cov
mock
commands =
py.test --cov-fail-under=30 --cov kursywalut --cov-report=html --cov-report=term
[testenv:doc]
skip_install = true
deps =
-rrequirements.txt
-rdocs/source/requirements.txt
commands =
sphinx-build -c docs/source/ docs/source/ docs/build/
[testenv:py36]
commands = py.test {toxinidir}/tests/unit --html=py36.html --self-contained-html
[testenv:py27]
commands = py.test {toxinidir}/tests/unit --html=py27.html --self-contained-html