blob: 656be6ca79e421ee4fb4b9b9eb4368213e8d914d [file] [log] [blame]
tierno0c01ffa2018-11-19 14:39:33 +01001# Copyright 2018 Telefonica S.A.
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
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
tiernoc94c3df2018-02-09 15:38:54 +010016[tox]
garciaale9fa89992020-11-18 10:06:03 -030017envlist = cover, flake8
tiernoc94c3df2018-02-09 15:38:54 +010018
19[testenv]
tierno1bfe4e22019-09-02 16:03:25 +000020usedevelop = True
tierno0c01ffa2018-11-19 14:39:33 +010021basepython = python3
tierno1bfe4e22019-09-02 16:03:25 +000022install_command = python3 -m pip install -r requirements.txt -U {opts} {packages}
tiernoc94c3df2018-02-09 15:38:54 +010023
garciadeblasf417d522020-02-19 18:11:52 +010024[testenv:cover]
25basepython = python3
26deps =
27 nose2
garciadeblasdaab2692020-06-03 13:34:16 +000028 nose2-cov
29 coverage
garciadeblasbea30742020-07-01 08:03:22 +000030 -rrequirements.txt
31 -rtest-requirements.txt
garciadeblasf417d522020-02-19 18:11:52 +010032commands =
33 coverage erase
34 nose2 -C --coverage osm_nbi --plugin nose2.plugins.junitxml -s osm_nbi/tests
35 coverage report --omit='*tests*'
36 coverage html -d ./cover --omit='*tests*'
37 coverage xml -o coverage.xml --omit='*tests*'
38
tiernoc94c3df2018-02-09 15:38:54 +010039[testenv:flake8]
40basepython = python3
garciadeblasf417d522020-02-19 18:11:52 +010041deps =
42 flake8
garciadeblasbea30742020-07-01 08:03:22 +000043 -rrequirements.txt
garciadeblasf417d522020-02-19 18:11:52 +010044commands =
45 flake8 osm_nbi setup.py --max-line-length 120 \
tierno1bfe4e22019-09-02 16:03:25 +000046 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,osm_im,.temp-tox --ignore W291,W293,E226,E402,W504
tiernoc94c3df2018-02-09 15:38:54 +010047
48[testenv:build]
49basepython = python3
50deps = stdeb
51 setuptools-version-command
52commands = python3 setup.py --command-packages=stdeb.command bdist_deb
tierno0c01ffa2018-11-19 14:39:33 +010053
tierno1bfe4e22019-09-02 16:03:25 +000054[testenv:unittest]
55basepython = python3
preethika.p0952a482019-09-20 16:37:50 +053056deps = asynctest
57 aioresponses
garciadeblasbea30742020-07-01 08:03:22 +000058commands = python3 -m unittest discover osm_nbi/tests -v
tierno1bfe4e22019-09-02 16:03:25 +000059