REC-11 Creating and testing Namespaces
[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            {posargs:.}
39
40 [pytest]
41 cache_dir = .pytest-cache
42 pep8maxlinelength = 100
43
44 [testenv:pylint]
45 basepython = python2.7
46 deps =
47     mock
48     pytest < 3.0
49     pytest-pylint
50     pylint < 2.0
51     -r{toxinidir}/requirements.txt
52
53 commands = py.test -m pylint -v \
54            --pylint \
55            --pylint-rcfile={toxinidir}/.pylintrc \
56            --ignore resources/system_testing/latency \
57            {posargs:.}
58
59
60 [testenv:rfcli]
61 basepython = python2.7
62
63 passenv =
64    DISPLAY
65    HOME
66
67 deps =
68     -r{toxinidir}/requirements.txt
69
70 commands =
71     rfcli --pythonpath {toxinidir}:{toxinidir}/resources \
72     --rfcli-no-pythonpath \
73     {posargs}
74
75 [testenv:check-requirements]
76 basepython = python2.7
77 deps =
78     -r{toxinidir}/requirements.txt
79     more-itertools < 6.0.0
80     requirements-tools==1.1.2
81     pytest < 4.0
82
83 commands = check-requirements
84
85 [testenv:freeze]
86 basepython = python2.7
87
88 deps = virtualenvrunner>=1.0
89
90 commands = create_virtualenv --recreate \
91                              --requirements {toxinidir}/requirements-minimal.txt \
92                              --save-freeze-path {toxinidir}/requirements.txt