def create_exact_coverage_data(self, path_dict): data = CoverageData() lines = {} covered = {} for path, path_info in path_dict.items(): lines[path] = path_info['lines'] covered[path] = path_info['covered'] data.update_lines(lines) data.update_coverage(covered) return data
def create_coverage_data(self, path_dict): data = CoverageData() lines = {} covered = {} for path, path_info in path_dict.items(): missing = path_info.get('missing', 10) total = path_info.get('total', missing + 30) lines[path] = range(1, total + 1) covered[path] = range(1, total - missing + 1) data.update_lines(lines) data.update_coverage(covered) return data
def collect(collectors, path_list, cover_filter): data = CoverageData() for collector in collectors: new_data = collector.collect(path_list, cover_filter) data.merge(new_data) return data