From 6f394a1740749efc50c8d958fb0668e83257bf7d Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Fri, 28 Feb 2020 18:12:14 +0800 Subject: Fix sonarcloud issue Exclude test files Issue-ID: MULTICLOUD-993 Signed-off-by: Ethan Lynn Change-Id: I6c7ba0afb06e01ac26ab8e8b7da3b50c8b65a931 --- vio/tox.ini | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vio/tox.ini b/vio/tox.ini index e957dc8..5ee0199 100644 --- a/vio/tox.ini +++ b/vio/tox.ini @@ -11,13 +11,17 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. [tox] -envlist = py36,pep8 +envlist = py36,pep8,cover skipsdist = true [tox:jenkins] downloadcache = ~/cache/pip [testenv] +basepython = + py36: python3 + pep8: python3 + cover: python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -27,7 +31,6 @@ commands = {basepython} manage.py test vio [testenv:pep8] -basepython = python3 deps=flake8 commands=flake8 @@ -36,10 +39,9 @@ commands=flake8 # {[testenv]commands} [testenv:cover] -basepython = python3 setenv= DJANGO_SETTINGS_MODULE = vio.settings-cover commands = coverage erase {[testenv]commands} - coverage xml -i + coverage xml -i --omit="*/api_v2/*,./venv-tox/*,./.tox/*,*tests*,*site-packages*" -- cgit 1.2.3-korg