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