def test__search_worker__search_show_lines__return_one_term(self): # Arrange path = self.txt_path terms = "sed" # Act result = FileInspector.search_worker(path, terms, False, True) # Assert self.assertEqual(list, type(result)) self.assertEqual(2, len(result))
def test__search_worker__search_show_lines__multiple_terms_case_sensitive(self): # Arrange path = self.txt_path terms = ["sed", "lorem"] # Act result = FileInspector.search_worker(path, terms, True, True) # Assert self.assertEqual(list, type(result)) self.assertEqual(2, len(result))
def test__search_worker__simple_search__return_multiple_terms(self): # Arrange path = self.txt_path terms = ["sed", "Lorem"] # Act result = FileInspector.search_worker(path, terms, False, False) # Assert self.assertEqual(list, type(result)) self.assertEqual(2, len(result))