Merge "ESCALATOR-40 add unittest framework"
[escalator.git] / api / tox.ini
1 [tox]
2 minversion = 1.6
3 envlist = py27,py33,py34,pep8
4 skipsdist = True
5
6 [testenv]
7 setenv = VIRTUAL_ENV={envdir}
8 usedevelop = True
9 install_command = pip install -U {opts} {packages}
10 deps = -r{toxinidir}/requirements.txt
11        -r{toxinidir}/test-requirements.txt
12 commands = python setup.py testr --slowest --testr-args='{posargs}'
13 whitelist_externals = bash
14
15 [tox:jenkins]
16 downloadcache = ~/cache/pip
17
18 [testenv:pep8]
19 commands =
20   flake8 {posargs}
21
22 [testenv:cover]
23 setenv = VIRTUAL_ENV={envdir}
24 commands = python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$'
25
26 [testenv:venv]
27 commands = {posargs}
28
29 [testenv:genconfig]
30 commands =
31   oslo-config-generator --config-file etc/oslo-config-generator/escalator-api.conf
32
33 [testenv:docs]
34 commands = python setup.py build_sphinx
35
36 [flake8]
37 # TODO(dmllr): Analyze or fix the warnings blacklisted below
38 # E711  comparison to None should be 'if cond is not None:'
39 # E712  comparison to True should be 'if cond is True:' or 'if cond:'
40 # H404  multi line docstring should start with a summary
41 # H405  multi line docstring summary not separated with an empty line
42 # H904  Wrap long lines in parentheses instead of a backslash
43 ignore = E711,E712,H404,H405,H904,F841,F821,E265,F812,F402,E226,E731
44 exclude = .venv,.git,.tox,dist,doc,etc,*escalator/locale*,*openstack/common*,*lib/python*,*egg,build,escalator/i18n.py
45
46 [hacking]
47 local-check-factory = escalator.hacking.checks.factory