def test_ending_with_nonmatch(self): text = 'simple test text' keyword = 'abc_' self.assertFalse(match_keywords(text, keyword))
def test_starting_with_nonmatch(self): text = 'simple test text' keyword = '_abc' self.assertFalse(match_keywords(text, keyword))
def test_ending_with_match(self): text = 'simple test text' keyword = 'est_' self.assertTrue(match_keywords(text, keyword))
def test_starting_with_match(self): text = 'simple test text' keyword = '_tes' self.assertTrue(match_keywords(text, keyword))
def test_multiple_word_nonmatch(self): text = 'simple test text' keyword = 'text, abc' self.assertFalse(match_keywords(text, keyword))
def test_multiple_word_match(self): text = 'simple test text' keyword = 'text, simple' self.assertTrue(match_keywords(text, keyword))
def test_multiple_words_space_seperated_match(self): text = 'simple test text' keyword = 'test text' self.assertTrue(match_keywords(text, keyword))
def test_empty_text_input(self): text = '' keyword = 'test' self.assertFalse(match_keywords(text, keyword))