Do not run exception handlers if test was skipped.

Change-Id: If9f031d010d293db57482f902f28ca29110cacac
Closes-Bug: #1587922
This commit is contained in:
Sergei Chipiga 2016-06-01 17:34:19 +03:00
parent e6610f90c6
commit c80edb161b
1 changed files with 9 additions and 0 deletions

View File

@ -136,6 +136,15 @@ class BaseTestCase(testtools.TestCase):
super(BaseTestCase, self).setUp()
def addOnException(self, exception_handler):
def wrapped_handler(exc_info):
if issubclass(exc_info[0], testtools.testcase.TestSkipped):
return
return exception_handler(exc_info)
super(BaseTestCase, self).addOnException(wrapped_handler)
def _configure_log(self):
"""Configure log to capture test logs include selenium logs in order
to attach them if test will be broken.