Merge "Take OpenStack's constraints into account"
[functest.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,py35,py27
3
4 [testenv]
5 usedevelop = True
6 deps =
7   -r{toxinidir}/requirements.txt
8   -r{toxinidir}/test-requirements.txt
9   git+https://gerrit.opnfv.org/gerrit/releng#egg=opnfv&subdirectory=modules
10   git+https://gerrit.opnfv.org/gerrit/snaps#egg=snaps
11 install_command = pip install \
12   -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?stable/ocata \
13   {opts} {packages}
14 commands = nosetests --with-xunit \
15   --with-coverage \
16   --cover-tests \
17   --cover-package=functest \
18   --cover-xml \
19   --cover-html \
20   functest/tests/unit
21
22 [testenv:docs]
23 basepython = python2.7
24 commands = sphinx-build -W -b html api/ api/_build
25
26 [testenv:pep8]
27 basepython = python2.7
28 commands = flake8
29
30 [testenv:pylint]
31 basepython = python2.7
32 whitelist_externals = bash
33 modules =
34   functest.core
35   functest.opnfv_tests.sdn.odl
36   functest.tests.unit.core
37   functest.tests.unit.odl
38   functest.tests.unit.utils.test_decorators
39   functest.utils.decorators
40 commands =
41   bash -c "\
42     pylint -f parseable --disable=locally-disabled functest | \
43     tee pylint.out | sed -ne '/Raw metrics/,//p'"
44   pylint --disable=locally-disabled --reports=n {[testenv:pylint]modules}
45
46 [testenv:py35]
47 dirs =
48   functest/tests/unit/core
49   functest/tests/unit/odl
50   functest/tests/unit/utils/test_decorators.py
51 commands = nosetests {[testenv:py35]dirs}