def load_suites(self, path, recursive=True, merge_suites=False): """ Auto load suites. Path can be package or simple dir. :param path: path to suites dir :type path: str :param recursive: recursive load from path or load from simple dir :type recursive: bool :param merge_suites: merge suites from sub application to self context. for master application only. :type merge_suites: bool """ if path not in sys.path: sys.path.append(path) if recursive: suites = loader.load_suites_from_path(path) else: suites = loader.load_suites_from_dir(path) self.register_suites(suites) if merge_suites: merge_context(self, merge_suites=True)
def load_suites(self, path, recursive=True): """ Auto load suites. Path can be package or simple dir. :param path: dir path :type path: str :param recursive: recursive load from path or load from simple dir :type recursive: bool """ sys.path.append(path) if recursive: suites = load_suites_from_path(path) else: suites = load_suites_from_dir(path) self.register_suites(suites)