Make coverage report human-readable on gates
Make coverage report human-readable on gates
Require minimal coverage of moved helpers: 75%
Change-Id: I59c589e8626bfa23fbf4f06845db27775f9714a2
(cherry picked from commit e96978d
)
This commit is contained in:
parent
42f9342180
commit
955dd69ab0
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
5
tox.ini
5
tox.ini
@ -49,7 +49,7 @@ deps=
|
||||
{[testenv]deps}
|
||||
pylint
|
||||
commands=
|
||||
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests run_system_test
|
||||
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests run_system_test core
|
||||
|
||||
|
||||
[testenv:pylint-py27-fuelweb]
|
||||
@ -85,4 +85,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
|
||||
|
Loading…
Reference in New Issue
Block a user