示例#1
0
    def test_node_from_text_oneormore(self):
        graph = PatternGraph(self._client_context.brain.aiml_parser)
        node = graph.node_from_text("_")
        self.assertIsNotNone(node)
        self.assertIsInstance(node, PatternOneOrMoreWildCardNode)

        node = graph.node_from_text("*")
        self.assertIsNotNone(node)
        self.assertIsInstance(node, PatternOneOrMoreWildCardNode)
示例#2
0
 def test_node_from_text_word(self):
     graph = PatternGraph(self._client_context.brain.aiml_parser)
     node = graph.node_from_text("X")
     self.assertIsNotNone(node)
     self.assertIsInstance(node, PatternWordNode)