def _search_case(include, exclude, base_dir, suffixes): case_files = set() for glob_pattern in include: for include_path in base_dir.glob(glob_pattern): case_files.update(ls_all(include_path, suffixes)) for glob_pattern in exclude: for exclude_path in base_dir.glob(glob_pattern): case_files -= set(ls_all(exclude_path, suffixes)) return case_files
def _search_case(include, exclude, base_dir, suffixes): case_files = set() all_test_case = {} exclude_test_case = {} for glob_pattern in include: all_test_case[glob_pattern] = set() for include_path in base_dir.glob(glob_pattern): case_files.update(ls_all(include_path, suffixes)) all_test_case[glob_pattern].update( ls_all(include_path, suffixes)) for glob_pattern in exclude: exclude_test_case[glob_pattern] = set() for exclude_path in base_dir.glob(glob_pattern): case_files -= set(ls_all(exclude_path, suffixes)) exclude_test_case[glob_pattern].update( ls_all(exclude_path, suffixes)) return all_test_case, exclude_test_case