aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2016-12-08 01:40:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-08 01:40:25 +0000
commit5a8fbd42df001313a3ffae71142fedba9f421b59 (patch)
tree8013c4d3c9d747b32b767ca1296b2306b43658e1
parent0665c9635a6332f479b181a186a3469aa9d45343 (diff)
parent1ff65ed841b3f848ebf44ea8e3bd608220150ebf (diff)
Merge "Fix bugs in `runner/benchmark`"
-rw-r--r--qtip/runner/benchmark.py4
-rw-r--r--tests/unit/runner/perftest_test.py1
-rw-r--r--tests/unit/runner/suite_test.py1
-rw-r--r--tests/unit/runner/testplan_test.py1
4 files changed, 5 insertions, 2 deletions
diff --git a/qtip/runner/benchmark.py b/qtip/runner/benchmark.py
index 56b5b30e..58e5a8d9 100644
--- a/qtip/runner/benchmark.py
+++ b/qtip/runner/benchmark.py
@@ -18,7 +18,7 @@ class Property:
ABSPATH = 'abspath'
-class Benchmark:
+class Benchmark(object):
"""Abstract class of QTIP benchmarks"""
_paths = [path.join(path.dirname(__file__), path.pardir, path.pardir,
@@ -40,7 +40,7 @@ class Benchmark:
def list_all(cls):
"""list all available benchmarks"""
names = chain.from_iterable([listdir(p) for p in cls._paths])
- return [Benchmark(name).describe() for name in names]
+ return [cls(name).describe() for name in names]
def describe(self):
"""description of benchmark"""
diff --git a/tests/unit/runner/perftest_test.py b/tests/unit/runner/perftest_test.py
index b3e6e8e2..1f0b5631 100644
--- a/tests/unit/runner/perftest_test.py
+++ b/tests/unit/runner/perftest_test.py
@@ -39,3 +39,4 @@ class TestPerfTest:
assert Property.NAME in desc
assert Property.DESCRIPTION in desc
assert Property.ABSPATH in desc
+ assert Property.ABSPATH is not None
diff --git a/tests/unit/runner/suite_test.py b/tests/unit/runner/suite_test.py
index 5d2f1066..10205801 100644
--- a/tests/unit/runner/suite_test.py
+++ b/tests/unit/runner/suite_test.py
@@ -39,3 +39,4 @@ class TestSuite:
assert Property.NAME in suite_desc
assert Property.DESCRIPTION in suite_desc
assert Property.ABSPATH in suite_desc
+ assert Property.ABSPATH is not None
diff --git a/tests/unit/runner/testplan_test.py b/tests/unit/runner/testplan_test.py
index 2700d385..de8bf1e1 100644
--- a/tests/unit/runner/testplan_test.py
+++ b/tests/unit/runner/testplan_test.py
@@ -39,3 +39,4 @@ class TestTestPlan:
assert Property.NAME in desc
assert Property.DESCRIPTION in desc
assert Property.ABSPATH in desc
+ assert Property.ABSPATH is not None