def get_tail_from_element_word_whitespaces(self): graph = PatternGraph(self._client_context.brain.aiml_parser) set_element = ET.fromstring( '<set>colour</set>this \t that \n the \r other') text = graph.get_tail_from_element(set_element) self.assertIsNotNone(text) self.assertEquals("this that the other", text)
def get_tail_from_element_word(self): graph = PatternGraph(self._client_context.brain.aiml_parser) set_element = ET.fromstring('<set>colour</set>this') text = graph.get_tail_from_element(set_element) self.assertIsNotNone(text) self.assertEquals("this", text)