-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
47 lines (40 loc) · 1.38 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
[tox]
skipsdist = True
envlist = py27,pep8,docs
[testenv]
deps = -r{toxinidir}/requirements.txt
commands = find {toxinidir} -name *.pyc -delete
nosetests []
[with-coverage]
whitelist_externals = bash
mv
deps = -r{toxinidir}/test-requirements.txt
commands = {toxinidir}/loadbalancer
nosetests -v --with-coverage --cover-package=loadbalancer tests/
bash -c "if [ ! -d .coverage_data ]; then mkdir .coverage_data; fi"
mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname}
[flake8]
# H302 import only modules
# H405 multi line docstring summary not separated with an empty line
ignore = H302,H405,F405,F403
max-complexity = 50
max-line-length = 79
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build
show-source = True
[testenv:pep8]
deps = flake8
autopep8
docstring-coverage
PyFlakes
#See more: https://github.com/hhatto/autopep8
#W293 - Remove trailing whitespace on blank line.
#E101 - Reindent all lines.
#E302 - Add missing 2 blank lines.
#E20 - Remove extraneous whitespace.
#E303 - Remove extra blank lines.
#W291 - Remove trailing whitespace.
commands = autopep8 --select=E101,W293,E302,E20,E303,W291 --in-place -r {toxinidir}/loadbalancer/
autopep8 --select=E101,W293,E302,E20,E303,W291 --in-place -r {toxinidir}/tests/
flake8 --max-complexity 15 {toxinidir}/loadbalancer/
flake8 {toxinidir}/tests/