Пример #1
0
 def test_ending_with_nonmatch(self):
     text = 'simple test text'
     keyword = 'abc_'
     self.assertFalse(match_keywords(text, keyword))
Пример #2
0
 def test_starting_with_nonmatch(self):
     text = 'simple test text'
     keyword = '_abc'
     self.assertFalse(match_keywords(text, keyword))
Пример #3
0
 def test_ending_with_match(self):
     text = 'simple test text'
     keyword = 'est_'
     self.assertTrue(match_keywords(text, keyword))
Пример #4
0
 def test_starting_with_match(self):
     text = 'simple test text'
     keyword = '_tes'
     self.assertTrue(match_keywords(text, keyword))
Пример #5
0
 def test_multiple_word_nonmatch(self):
     text = 'simple test text'
     keyword = 'text, abc'
     self.assertFalse(match_keywords(text, keyword))
Пример #6
0
 def test_multiple_word_match(self):
     text = 'simple test text'
     keyword = 'text, simple'
     self.assertTrue(match_keywords(text, keyword))
Пример #7
0
 def test_multiple_words_space_seperated_match(self):
     text = 'simple test text'
     keyword = 'test text'
     self.assertTrue(match_keywords(text, keyword))
Пример #8
0
 def test_empty_text_input(self):
     text = ''
     keyword = 'test'
     self.assertFalse(match_keywords(text, keyword))