def standard_csv_dir(self, dir, fit_pattern, exclude=None, filters=None): for source_fit_path in glob(join(self.test_dir, 'source', dir, fit_pattern)): if not exclude or basename(source_fit_path) not in exclude: source_csv_path = sub_extn(source_fit_path, 'csv') if exists(source_csv_path): self.standard_csv(source_fit_path, source_csv_path, filters=filters) else: log.warning('Could not find %s' % source_csv_path) target_csv_path = sub_dir(source_csv_path, 'target', 2) if exists(target_csv_path): self.standard_csv(source_fit_path, target_csv_path, filters=filters) else: log.warning('Could not find %s' % target_csv_path)
def standard_dmp_dir(self, dir, fit_pattern, format, exclude=None, filters=None): for source_fit_path in glob( join(self.test_dir, 'source', dir, fit_pattern)): if not exclude or basename(source_fit_path) not in exclude: target_dmp_path = sub_extn( sub_dir(source_fit_path, 'target', 2), format[:3]) self.standard_dmp(source_fit_path, target_dmp_path, format, filters=filters)