Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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')
Esempio n. 4
0
    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