示例#1
0
    def test_is_word_in_text(self):

        text = "This is very easy task"
        words = text.split()

        for word in words:
            self.assertTrue(is_word_in_text(word, text))
示例#2
0
    def test_is_word_text(self):
        text = "Some another text"
        words = ["some", "blabla", ".", "y"]

        for word in words:
            result = is_word_in_text(word, text)
            self.assertIsNotNone(result)
            self.assertFalse(result)