aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core/pytest_suite_runner.py
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-05-18 15:02:11 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-18 15:02:11 +0000
commit4677fc843f6eaea0b35960f838452129b746d49e (patch)
tree46af6755a21af8e2fcf7bfb86999b93e57cea892 /functest/core/pytest_suite_runner.py
parent59d4e9757e52f452a67bbce48c2ebafc431f4cb1 (diff)
parentc7a17c95377eb277bfe648f17fda9b5f22d3a30c (diff)
Merge "Allow running unittest.TestCase via run_tests.py"
Diffstat (limited to 'functest/core/pytest_suite_runner.py')
-rw-r--r--functest/core/pytest_suite_runner.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/functest/core/pytest_suite_runner.py b/functest/core/pytest_suite_runner.py
index bcbaa25d..9d787359 100644
--- a/functest/core/pytest_suite_runner.py
+++ b/functest/core/pytest_suite_runner.py
@@ -30,6 +30,11 @@ class PyTestSuiteRunner(testcase.TestCase):
"""
Starts test execution from the functest framework
"""
+ try:
+ name = kwargs["name"]
+ self.suite = unittest.TestLoader().loadTestsFromName(name)
+ except KeyError:
+ pass
self.start_time = time.time()
result = unittest.TextTestRunner(verbosity=2).run(self.suite)
self.stop_time = time.time()