Fix missing import
[osm/N2VC.git] / tox.ini
1 # Copyright 2019 Canonical Ltd.
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 envlist = cover, flake8, pylint
17
18 [testenv]
19
20 [testenv:cover]
21 basepython = python3
22 deps =
23 nose2
24 -rrequirements.txt
25 -rtest-requirements.txt
26 commands =
27 coverage erase
28 nose2 -C --coverage n2vc --plugin nose2.plugins.junitxml -s n2vc
29 coverage report --omit='*tests*'
30 coverage html -d ./cover --omit='*tests*'
31 coverage xml -o coverage.xml --omit='*tests*'
32
33 [testenv:pylint]
34 basepython = python3
35 deps =
36 pylint
37 -rrequirements.txt
38 commands =
39 pylint -E n2vc
40
41 [testenv:black]
42 basepython = python3
43 deps =
44 black
45 commands =
46 black --check --diff n2vc
47
48 [testenv:flake8]
49 basepython = python3
50 deps =
51 flake8
52 -rrequirements.txt
53 commands =
54 flake8 n2vc
55
56 [flake8]
57 # W503 is invalid PEP-8
58 max-line-length = 88
59 show-source = True
60 ignore = W503,E203
61 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,devops_stages/*,.rst
62
63 [testenv:build]
64 deps =
65 stdeb
66 setuptools-version-command
67 commands = python3 setup.py --command-packages=stdeb.command bdist_deb