def test_chow_unreachable(self): heuristic = chow( "Wales", "North Korea", "Russia" ) self.G.add_node("Sealand") self.G.add_edge("England", "Sealand") heuristic.optimize(self.G) self.G.del_edge("England", "Sealand") try: result = pygraph.algorithms.minmax.heuristic_search( self.G, "England", "Sealand" , heuristic ) except exceptions.NodeUnreachable, _: return
def test_chow(self): heuristic = chow( "Wales", "North Korea", "Russia" ) heuristic.optimize(self.G) result = pygraph.algorithms.minmax.heuristic_search( self.G, "England", "India", heuristic )