From a9410b87464aab3bac170b63de245753dc93174e Mon Sep 17 00:00:00 2001 From: Lusheng Ji Date: Mon, 19 Feb 2018 22:29:52 -0500 Subject: Fix Sonar reporting Change-Id: Iebb1314eab1d238f723e3f55803a7a32c317d77c Signed-off-by: Lusheng Ji Issue-ID: DCAEGEN2-355 --- pom.xml | 9 --------- tests/__init__.py | 21 +++++++++++++++++++++ tox.ini | 6 ++++-- 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 tests/__init__.py diff --git a/pom.xml b/pom.xml index 8edefe4..3f4a09d 100644 --- a/pom.xml +++ b/pom.xml @@ -36,18 +36,9 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. false . - xunit-reports/xunit-result-configbinding.xml - py python config_binding_service/**.py - http://135.205.228.63:9000 - - ${project.artifactId}-${project.version} diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..1875bf6 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,21 @@ +# ================================================================================ +# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. + + +# empty __init__.py so that pytest can add correct path to coverage report, -- per pytest +# best practice guideline diff --git a/tox.ini b/tox.ini index aeadddf..7ba18f6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py27,py36 +envlist = py36 [testenv] deps= @@ -11,4 +11,6 @@ deps= setenv = CONSUL_HOST = 8.8.8.8 HOSTNAME = config_binding_service -commands=pytest --junitxml xunit-reports/xunit-result-configbinding.xml --cov {envsitepackagesdir}/config_binding_service --cov-report=xml +commands= + #pytest --cov {envsitepackagesdir}/config_binding_service --cov-report=xml tests --verbose + pytest --verbose --cov config_binding_service --cov-report=xml --cov-report=term tests -- cgit 1.2.3-korg