---
mapper.py | 19 +++++++++++++++++++
proxy.py | 11 +++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/mapper.py b/mapper.py
index affc510..f0b675a 100644
--- a/mapper.py
+++ b/mapper.py
@@ -55,3 +55,22 @@ class Mapper(object):
prev_testcases_params = testcases_params
return tripped_cases_list
+
+ def clean_package_casename_func_map(self):
+ """get testcase function maping without cleaning ones
"""
+ tripped_cases_list = []
+ for testcase in self.testcases_list:
+ tripped_case = {}
+ testcase_name = testcase.keys()[0]
+ if ":" in testcase_name:
+ casename = testcase_name.split(":")[1]
+ func = casename + "_clean"
+
+ if testcase_name == 'sleep' or testcase_name == 'clean':
+ continue
+
+ testcases_params = testcase.values()[0]
+ tripped_case[testcase_name + ":" + func] = testcases_params
+ tripped_cases_list.append(tripped_case)
+
+ return tripped_cases_list
diff --git a/proxy.py b/proxy.py
index f3664e3..aa34d9a 100644
--- a/proxy.py
+++ b/proxy.py
@@ -25,9 +25,10 @@ class Proxy(object):
def __init__(self, testcases_names):
""" Argument case_list is test case list """
self.testcases_names = testcases_names
- self.func_dict = dict()
def get_func_call_dict(self):
+ """Return running function reference dictionary
"""
+ self.func_dict = dict()
for testcase_name in self.testcases_names:
# Get programming package, casename
elements = testcase_name.split(":")
@@ -51,8 +52,14 @@ class Proxy(object):
def get_clearfunc_call_dict(self):
""" Return a clearing function reference dictionary.
"""
+ self.func_dict = dict()
for testcase_name in self.testcases_names:
# Get programming package, casename
+ elements = testcase_name.split(":")
+
+ if len(elements) == 3:
+ continue
+
package = testcase_name.split(":")[0]
casename = testcase_name.split(":")[1]
@@ -64,7 +71,7 @@ class Proxy(object):
func_ref = funcs(package, casename, func)
# Construct function call dictionary
- key = package + ":" + casename
+ key = package + ":" + casename + ":" + func
self.func_dict[key] = func_ref
return self.func_dict
--
1.7.1