def testPathToNode(self):
     search = self.search
     self.assertEqual(len(search.path), 5)
     self.assertEqual(search.path[0], Node(search.startPosition))
     self.assertEqual(search.path[1], Node((0, 1)))
     self.assertEqual(search.path[2], Node((0, 2)))
     self.assertEqual(search.path[3], Node((0, 3)))
     self.assertEqual(search.path[4], Node(search.endPosition))
示例#2
0
 def testPathToNode(self):
     search = self.search
     self.assertEqual(len(search.path), 9)
     self.assertEqual(search.path[0], Node(search.startPosition))
     self.assertEqual(search.path[1], Node((0, 1)))
     self.assertEqual(search.path[2], Node((0, 2)))
     self.assertEqual(search.path[3], Node((1, 2)))
     self.assertEqual(search.path[4], Node((1, 3)))
     self.assertEqual(search.path[5], Node((1, 4)))
     self.assertEqual(search.path[6], Node((2, 4)))
     self.assertEqual(search.path[7], Node((3, 4)))
     self.assertEqual(search.path[8], Node(search.endPosition))