aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-12-09 19:46:54 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-12-09 19:46:54 +0100
commit14f2b4917411bb24a03f04a210627f144873a995 (patch)
treec31e65382ed075ad4a4837cd85548f094012e48d
parentdafed654965a05cab6891b53df80f11e37a1750a (diff)
Snaps integration
Fix testcase class name Minor change on criteria, start_time, stop_time Change-Id: I9ba49781c3a3212f03b7ab822f9ab311a4fafd3d Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
-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 ba372c3b9..2d5b2667b 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