| tierno | b3cda2e | 2018-10-30 17:26:59 +0000 | [diff] [blame] | 1 | # 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 | |
| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 16 | [tox] |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 17 | envlist = cover, flake8, unittest |
| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 18 | |
| 19 | [testenv] |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 20 | usedevelop = True |
| tierno | b3cda2e | 2018-10-30 17:26:59 +0000 | [diff] [blame] | 21 | basepython = python3 |
| 22 | install_command = python3 -m pip install -r requirements.txt -U {opts} {packages} |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 23 | |
| 24 | [testenv:cover] |
| 25 | basepython = python3 |
| 26 | deps = |
| 27 | nose2 |
| 28 | nose2-cov |
| 29 | coverage |
| 30 | -rrequirements.txt |
| 31 | -rtest-requirements.txt |
| 32 | commands = |
| 33 | coverage erase |
| 34 | nose2 -C --coverage osm_lcm --plugin nose2.plugins.junitxml -s osm_lcm/tests |
| 35 | coverage report --omit='*tests*' |
| 36 | coverage html -d ./cover --omit='*tests*' |
| 37 | coverage xml -o coverage.xml --omit='*tests*' |
| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 38 | |
| 39 | [testenv:flake8] |
| 40 | basepython = python3 |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 41 | deps = |
| 42 | flake8 |
| 43 | -rrequirements.txt |
| tierno | b3cda2e | 2018-10-30 17:26:59 +0000 | [diff] [blame] | 44 | commands = flake8 osm_lcm --max-line-length 120 \ |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 45 | --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp,frontend_grpc.py,frontend_pb2.py \ |
| 46 | --ignore W291,W293,E226,W504 |
| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 47 | |
| tierno | 51d065c | 2019-08-26 16:48:23 +0000 | [diff] [blame] | 48 | [testenv:unittest] |
| 49 | basepython = python3 |
| 50 | deps = asynctest |
| garciaale | 6500339 | 2020-10-21 15:21:37 -0300 | [diff] [blame] | 51 | commands = python3 -m unittest discover osm_lcm/tests -v |
| tierno | 51d065c | 2019-08-26 16:48:23 +0000 | [diff] [blame] | 52 | |
| tierno | c0e42e2 | 2018-05-11 11:36:10 +0200 | [diff] [blame] | 53 | [testenv:build] |
| 54 | basepython = python3 |
| 55 | deps = stdeb |
| 56 | setuptools-version-command |
| 57 | commands = python3 setup.py --command-packages=stdeb.command bdist_deb |
| tierno | b3cda2e | 2018-10-30 17:26:59 +0000 | [diff] [blame] | 58 | |