def match(s): for o in s: if isinstance(o, BaseSuite): self.MATCH[get_suite_master_id(o)] = o match(o) else: self.MATCH[get_case_master_id(o)] = o
def get_master_id(obj): """ Get id of master process """ if isinstance(obj, BaseSuite): return get_suite_master_id(obj) return get_case_master_id(obj)
def match(self, suite): """ Match id of master process to instance """ self.MATCH[get_suite_master_id(suite)] = suite def match(s): for o in s: if isinstance(o, BaseSuite): self.MATCH[get_suite_master_id(o)] = o match(o) else: self.MATCH[get_case_master_id(o)] = o match(suite)