Esempio n. 1
0
    def test_no_str_found(self):
        """Function:  test_no_str_found

        Description:  Test with no string found.

        Arguments:

        """

        self.assertEqual(gen_libs.file_search(self.f_name, self.no_str), None)
Esempio n. 2
0
    def test_str_found_last_line(self):
        """Function:  test_str_found_last_line

        Description:  Test string found in last line.

        Arguments:

        """

        self.assertEqual(gen_libs.file_search(self.f_name, self.last_str),
                         self.match_last)
Esempio n. 3
0
    def test_str_found_first_instance(self):
        """Function:  test_str_found_first_instance

        Description:  Test found with multiple matches.

        Arguments:

        """

        self.assertEqual(gen_libs.file_search(self.f_name, self.multi_str),
                         self.match_multi)