Make coverage report human-readable on gates

Make coverage report human-readable on gates
Require minimal coverage of moved helpers: 75%

Change-Id: I59c589e8626bfa23fbf4f06845db27775f9714a2
This commit is contained in:
Alexey Stepanov 2016-08-29 08:26:11 +03:00
parent 3b5d9b2f10
commit e96978ddea
4 changed files with 16 additions and 10 deletions

View File

@ -2,8 +2,10 @@ from __future__ import absolute_import
import unittest
from mock import patch
# pylint: disable=import-error
from mock import call
from mock import patch
# pylint: enable=import-error
from core.helpers.http import HTTPClientZabbix

View File

@ -3,8 +3,10 @@ from __future__ import print_function
import unittest
# pylint: disable=import-error
from mock import call
from mock import patch
# pylint: enable=import-error
from core.helpers import setup_teardown
@ -159,6 +161,11 @@ class TestWrappers(unittest.TestCase):
'cls was not filtered from @classmethod!'
)
# Allow to replace function by None in special cases
self.assertIsNone(
call_in_context(None, {'test_arg': 'test_val'})
)
@patch('core.helpers.setup_teardown.__getcallargs', return_value={'arg': True})
@patch('core.helpers.setup_teardown.__call_in_context')
@ -166,12 +173,6 @@ class TestSetupTeardown(unittest.TestCase):
def test_basic(self, call_in, getargs):
arg = True
def setup_func():
pass
def teardown_func():
pass
@setup_teardown.setup_teardown()
def positive_example(arg):
return arg

View File

@ -3,8 +3,10 @@ from __future__ import unicode_literals
import unittest
from mock import patch
# pylint: disable=import-error
from mock import call
from mock import patch
# pylint: enable=import-error
from core.models.collector_client import CollectorClient

View File

@ -49,7 +49,7 @@ deps=
{[testenv]deps}
pylint
commands=
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests fuel_tests run_system_test
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests fuel_tests run_system_test core
[testenv:pylint-py27-fuelweb]
@ -91,4 +91,5 @@ deps =
{[testenv]deps}
commands =
py.test --cov-config .coveragerc --cov-report html --cov=core core/_tests
coverage report
coverage html -d {envlogdir}
coverage report --fail-under 75