blob: 68c621132dbdfdc368ec1302c2c1d04172054e74 [file] [log] [blame]
magnussonl2b0e2d72020-02-04 10:52:46 +01001##
2# Copyright 2020 ArctosLabs Scandinavia AB
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15##
16[tox]
17envlist = py3
18
19[testenv]
20basepython = python3
21install_command = python3 -m pip install -U {opts} {packages}
22deps = -rrequirements.txt
23 -rtest-requirements.txt
24commands = python3 -m unittest discover -v
25
26[testenv:coverage]
27basepython = python3
28deps = -rrequirements.txt
29 -rtest-requirements.txt
30commands = coverage run -m unittest discover
31 coverage report --omit='*site-packages*','*test*','*__init__*'
32 coverage html -d ./.tox/coverage/HTMLreport --omit='*site-packages*','*test*','*__init__*'
33 coverage xml -o ./.tox/coverage/XMLreport/coverage.xml --omit='*site-packages*','*test*','*__init__*'
34 coverage erase
35
36[testenv:flake8]
37basepython = python3
38deps = flake8
39 -rrequirements.txt
40commands = flake8 {toxinidir}/osm_pla/ {toxinidir}/setup.py \
41 --max-line-length 120 \
42 --exclude test_mznmodels.py,.svn,CVS,.gz,.git,__pycache__,.tox,local,temp
43
44[testenv:build]
45basepython = python3
46# changedir ={toxinidir}
47deps = stdeb
48 setuptools-version-command
49 -rrequirements.txt
50commands = python3 setup.py --command-packages=stdeb.command bdist_deb