| tierno | 87858ca | 2018-10-08 16:30:15 +0200 | [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 | 5c01261 | 2018-04-19 16:01:59 +0200 | [diff] [blame] | 16 | [tox] |
| garciadeblas | ad8227e | 2020-07-03 10:59:34 +0000 | [diff] [blame] | 17 | envlist = cover, flake8, unittest, pytest |
| 18 | |
| 19 | [testenv] |
| 20 | usedevelop = True |
| 21 | basepython = python3 |
| 22 | |
| 23 | [testenv:cover] |
| 24 | basepython = python3 |
| 25 | deps = |
| 26 | nose2 |
| 27 | nose2-cov |
| 28 | coverage |
| 29 | pytest |
| 30 | pytest-asyncio |
| 31 | pycrypto |
| 32 | |
| 33 | commands = |
| 34 | coverage erase |
| 35 | nose2 -C --coverage osm_common --plugin nose2.plugins.junitxml -s osm_common/tests |
| 36 | coverage report --omit='*tests*' |
| 37 | coverage html -d ./cover --omit='*tests*' |
| 38 | coverage xml -o coverage.xml --omit='*tests*' |
| tierno | 5c01261 | 2018-04-19 16:01:59 +0200 | [diff] [blame] | 39 | |
| tierno | 136f295 | 2018-10-19 13:01:03 +0200 | [diff] [blame] | 40 | [testenv:pytest] |
| Eduardo Sousa | 222a9d4 | 2018-04-26 13:08:05 +0100 | [diff] [blame] | 41 | basepython = python3 |
| tierno | 136f295 | 2018-10-19 13:01:03 +0200 | [diff] [blame] | 42 | deps = pytest |
| 43 | pytest-asyncio |
| 44 | pycrypto |
| 45 | commands = pytest osm_common |
| tierno | 5c01261 | 2018-04-19 16:01:59 +0200 | [diff] [blame] | 46 | |
| 47 | [testenv:flake8] |
| 48 | basepython = python3 |
| 49 | deps = flake8 |
| 50 | commands = |
| tierno | b20a902 | 2018-05-22 12:07:05 +0200 | [diff] [blame] | 51 | flake8 osm_common/ setup.py --max-line-length 120 --exclude .svn,CVS,.gz,.git,__pycache__,.tox,local,temp --ignore W291,W293,E226 |
| tierno | 5c01261 | 2018-04-19 16:01:59 +0200 | [diff] [blame] | 52 | |
| tierno | 136f295 | 2018-10-19 13:01:03 +0200 | [diff] [blame] | 53 | [testenv:unittest] |
| 54 | basepython = python3 |
| 55 | deps = pycrypto |
| 56 | pytest |
| tierno | 7fc50dd | 2020-02-17 12:01:38 +0000 | [diff] [blame] | 57 | commands = python3 -m unittest discover osm_common.tests |
| tierno | 136f295 | 2018-10-19 13:01:03 +0200 | [diff] [blame] | 58 | |
| tierno | 5c01261 | 2018-04-19 16:01:59 +0200 | [diff] [blame] | 59 | [testenv:build] |
| 60 | basepython = python3 |
| 61 | deps = stdeb |
| 62 | setuptools-version-command |
| 63 | commands = python3 setup.py --command-packages=stdeb.command bdist_deb |
| garciadeblas | ad8227e | 2020-07-03 10:59:34 +0000 | [diff] [blame] | 64 | |