aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
diff options
context:
space:
mode:
authorOle Trøan <otroan@employees.org>2018-11-22 10:01:09 +0000
committerOle Trøan <otroan@employees.org>2018-11-22 10:01:09 +0000
commit5ba9159a157141554e53af9821c8da07a93da7ff (patch)
tree3d77a8677a5d7e5bad4df8062a634cbe40d98e32 /test/framework.py
parentc32023b9fd6970ed1cac1b3c7f36233b536d9968 (diff)
Revert "Fix instance method call in test/framework.py"
This reverts commit c32023b9fd6970ed1cac1b3c7f36233b536d9968. Change-Id: Ic934d223b10028093b0262e28515bde3ae1ccb71 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r--test/framework.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/framework.py b/test/framework.py
index 019f366dabe..4c536e062b0 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -983,6 +983,14 @@ 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
@@ -1167,12 +1175,7 @@ class VppTestResult(unittest.TestResult):
:returns: test description
"""
- # 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)
+ return get_test_description(self.descriptions, test)
def startTest(self, test):
"""