aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core/pytest_suite_runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/core/pytest_suite_runner.py')
-rw-r--r--functest/core/pytest_suite_runner.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/functest/core/pytest_suite_runner.py b/functest/core/pytest_suite_runner.py
index ba372c3b..2d5b2667 100644
--- a/functest/core/pytest_suite_runner.py
+++ b/functest/core/pytest_suite_runner.py
@@ -7,12 +7,12 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
-from functest.core import TestCasesBase
+import testcase_base as base
import unittest
import time
-class PyTestSuiteRunner(TestCasesBase.TestCasesBase):
+class PyTestSuiteRunner(base.TestcaseBase):
"""
This superclass is designed to execute pre-configured unittest.TestSuite()
objects
@@ -25,9 +25,9 @@ class PyTestSuiteRunner(TestCasesBase.TestCasesBase):
"""
Starts test execution from the functest framework
"""
- start_time = time.time()
+ self.start_time = time.time()
result = unittest.TextTestRunner(verbosity=2).run(self.suite)
- end_time = time.time()
+ self.stop_time = time.time()
if result.errors:
self.logger.error('Number of errors in test suite - ' +
@@ -45,12 +45,11 @@ class PyTestSuiteRunner(TestCasesBase.TestCasesBase):
or (result.failures and len(result.failures) > 0):
self.logger.info("%s FAILED" % self.case_name)
self.criteria = 'FAIL'
- exit_code = TestCasesBase.TestCasesBase.EX_RUN_ERROR
+ exit_code = base.TestcaseBase.EX_RUN_ERROR
else:
self.logger.info("%s OK" % self.case_name)
- exit_code = TestCasesBase.TestCasesBase.EX_OK
+ exit_code = base.TestcaseBase.EX_OK
+ self.criteria = 'PASS'
- self.details = {'timestart': start_time,
- 'duration': round(end_time - start_time, 1),
- 'status': self.criteria}
+ self.details = {}
return exit_code