Merge "Leverage on pbr (Python Build Reasonableness)"
[functest-xtesting.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/barometer#egg=baro_tests
11   git+https://gerrit.opnfv.org/gerrit/snaps#egg=snaps
12 commands = nosetests --with-xunit \
13   --with-coverage \
14   --cover-tests \
15   --cover-package=functest \
16   --cover-xml \
17   --cover-html \
18   functest/tests/unit
19
20 [testenv:docs]
21 basepython = python2.7
22 commands = sphinx-build -W -b html api/ api/_build
23
24 [testenv:pep8]
25 basepython = python2.7
26 commands = flake8
27
28 [testenv:pylint]
29 basepython = python2.7
30 whitelist_externals = bash
31 modules =
32   functest.core.feature
33   functest.core.testcase
34   functest.core.unit
35   functest.opnfv_tests.sdn.odl
36   functest.tests.unit.core.test_feature
37   functest.tests.unit.core.test_testcase
38   functest.tests.unit.core.test_unit
39   functest.tests.unit.odl
40   functest.tests.unit.utils.test_decorators
41   functest.utils.decorators
42 commands =
43   bash -c "\
44     pylint -f parseable --disable=locally-disabled functest | \
45     tee pylint.out | sed -ne '/Raw metrics/,//p'"
46   pylint --disable=locally-disabled --reports=n {[testenv:pylint]modules}
47
48 [testenv:py35]
49 dirs =
50   functest/tests/unit/core
51   functest/tests/unit/odl
52   functest/tests/unit/utils/test_decorators.py
53 commands = nosetests {[testenv:py35]dirs}