예제 #1
0
    def test_file_search2(self):
        """Function:  test_file_search2

        Description:  Test with files matching.

        Arguments:

        """

        self.assertEqual(
            gen_libs.filename_search(self.dir_path, self.file_str3),
            self.results3)
예제 #2
0
    def test_file_search_path(self):
        """Function:  test_file_search_path

        Description:  Test with files matching with path included.

        Arguments:

        """

        self.assertEqual(
            gen_libs.filename_search(self.dir_path, self.file_str,
                                     True).sort(), self.results4.sort())
예제 #3
0
    def test_no_file_search(self, mock_list):
        """Function:  test_no_file_search

        Description:  Test with no files matching.

        Arguments:

        """

        mock_list.return_value = self.list_files

        self.assertEqual(
            gen_libs.filename_search(self.dir_path, self.file_str2),
            self.results)
예제 #4
0
    def test_file_search_path(self, mock_list):
        """Function:  test_file_search_path

        Description:  Test with files matching with path included.

        Arguments:

        """

        mock_list.return_value = self.list_files

        self.assertEqual(
            gen_libs.filename_search(self.dir_path, self.file_str, True),
            self.results4)