leverage tox to facilitate the development
[releng.git] / utils / test / testapi / tox.ini
1 # Tox (http://tox.testrun.org/) is a tool for running tests
2 # in multiple virtualenvs. This configuration file will run the
3 # test suite on all supported python versions. To use it, "pip install tox"
4 # and then run "tox" from this directory.
5
6 [tox]
7 envlist = py27,pep8
8 skipsdist = True
9 sitepackages = True
10
11 [testenv]
12 usedevelop = True
13 install_command = pip install -U {opts} {packages}
14 deps =
15   -rrequirements.txt
16   -rtest-requirements.txt
17 commands=
18   py.test \
19     --basetemp={envtmpdir} \
20     --cov \
21     {posargs}
22 setenv=
23   HOME = {envtmpdir}
24   PYTHONPATH = {toxinidir}
25
26 [testenv:pep8]
27 deps = flake8
28 commands = flake8 {toxinidir}
29
30 [flake8]
31 # H803 skipped on purpose per list discussion.
32 # E123, E125 skipped as they are invalid PEP-8.
33
34 show-source = True
35 ignore = E123,E125,H803,E501
36 builtins = _
37 exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv,testapi_venv,venv
38
39 [pytest]
40 testpaths = opnfv_testapi/tests
41 python_functions = test_*