Merge "Fix error in REC-13"
[ta/cloudtaf.git] / tox.ini
1 # Copyright 2019 Nokia
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 [tox]
16 setupdir = {toxinidir}/libraries
17 envlist = py27, pylint, check-requirements
18
19 [testenv]
20 setenv =
21    COVERAGE_FILE=.coverage.{envname}
22
23 deps =
24     mock
25     pytest < 4.0
26     pytest-pep8
27     pytest-cov
28     more-itertools < 6.0.0
29     -r{toxinidir}/requirements.txt
30
31 commands = py.test -v \
32            --basetemp={envtmpdir} \
33            --pep8 \
34            --cov . \
35            --cov-branch \
36            --cov-report term-missing \
37            --cov-report html:coverage-html-{envname} \
38            --ignore testcases/pm-support/misc \
39            {posargs:.}
40
41 [pytest]
42 cache_dir = .pytest-cache
43 pep8maxlinelength = 100
44
45 [testenv:pylint]
46 basepython = python2.7
47 deps =
48     mock
49     pytest < 3.0
50     pytest-pylint
51     pylint < 2.0
52     -r{toxinidir}/requirements.txt
53
54 commands = py.test -m pylint -v \
55            --pylint \
56            --pylint-rcfile={toxinidir}/.pylintrc \
57            --ignore resources/system_testing/latency \
58            --ignore testcases/pm-support/misc \
59            {posargs:.}
60
61
62 [testenv:rfcli]
63 basepython = python2.7
64
65 passenv =
66    DISPLAY
67    HOME
68
69 deps =
70     -r{toxinidir}/requirements.txt
71
72 commands =
73     rfcli --pythonpath {toxinidir}:{toxinidir}/resources \
74     --rfcli-no-pythonpath \
75     {posargs}
76
77 [testenv:check-requirements]
78 basepython = python2.7
79 deps =
80     -r{toxinidir}/requirements.txt
81     more-itertools < 6.0.0
82     requirements-tools==1.1.2
83     pytest < 4.0
84
85 commands = check-requirements
86
87 [testenv:freeze]
88 basepython = python2.7
89
90 deps = virtualenvrunner>=1.0
91
92 commands = create_virtualenv --recreate \
93                              --requirements {toxinidir}/requirements-minimal.txt \
94                              --save-freeze-path {toxinidir}/requirements.txt