65f5fb68d29bf515ea83d3ef3ef6f0d24808e28f
[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 = pep8,py27
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     {posargs}
21 setenv=
22   HOME = {envtmpdir}
23   PYTHONPATH = {toxinidir}
24
25 [testenv:pep8]
26 deps = flake8
27 commands = flake8 {toxinidir}
28
29 [flake8]
30 # H803 skipped on purpose per list discussion.
31 # E123, E125 skipped as they are invalid PEP-8.
32
33 show-source = True
34 ignore = E123,E125,H803,E501
35 builtins = _
36 exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv,testapi_venv,venv
37
38 [pytest]
39 testpaths = opnfv_testapi/tests
40 python_functions = test_*