def test_partial_directory(self): directory = path.join(path_to_module, "partial_dir") res = progress.get_directory_status(directory, "SampleSheet.csv") self.assertEqual(res.status, "partial") self.assertIsNone(res.message)
def test_inaccessible_directory(self): directory = path.join(path_to_module, "inaccessible_dir") res = progress.get_directory_status(directory, "SampleSheet.csv") self.assertEqual(res.status, "invalid") self.assertIsNotNone(res.message)
def find_single_run(directory): """ Find a run in the base directory given :param directory: :return: DirectoryStatus object """ logging.info("looking for run in {}".format(directory)) return progress.get_directory_status(directory, 'SampleList.csv')
def find_runs(directory): """ find a list of run directories in the directory given :param directory: :return: list of DirectoryStatus objects """ logging.info("looking for runs in {}".format(directory)) runs = [] directory_list = Parser._find_directory_list(directory) for d in directory_list: runs.append(progress.get_directory_status(d, 'SampleList.csv')) return runs