Ejemplo n.º 1
0
    def test_path(self):
        n1 = SearchNode(problem=self.problem, state='i')
        n2 = SearchNode(action='a', state='ia', parent=n1)
        n3 = SearchNode(action='b', state='iab', parent=n2)

        path = [(None, 'i'), ('a', 'ia'), ('b', 'iab')]

        self.assertEqual(n3.path(), path)
Ejemplo n.º 2
0
    def test_path(self):
        n1 = SearchNode(problem=self.problem, state='i')
        n2 = SearchNode(action='a', state='ia', parent=n1)
        n3 = SearchNode(action='b', state='iab', parent=n2)

        path = [(None, 'i'), ('a', 'ia'), ('b', 'iab')]

        self.assertEquals(n3.path(), path)