Fix instance method call in test/framework.py

Instance method breaking encapsulation by calling a global fn.

Change-Id: Ifde2a207951143764aed75f1b191aed0bac83704
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:
Paul Vinciguerra
2018-11-21 09:54:50 -08:00
committed by Ole Trøan
parent 5642109506
commit c32023b9fd
2 changed files with 8 additions and 15 deletions

View File

@ -983,14 +983,6 @@ def get_testcase_doc_name(test):
return getdoc(test.__class__).splitlines()[0]
def get_test_description(descriptions, test):
short_description = test.shortDescription()
if descriptions and short_description:
return short_description
else:
return str(test)
class TestCaseInfo(object):
def __init__(self, logger, tempdir, vpp_pid, vpp_bin_path):
self.logger = logger
@ -1175,7 +1167,12 @@ class VppTestResult(unittest.TestResult):
:returns: test description
"""
return get_test_description(self.descriptions, test)
# TODO: if none print warning not raise exception
short_description = test.shortDescription()
if self.descriptions and short_description:
return short_description
else:
return str(test)
def startTest(self, test):
"""