Пример #1
0
def test_a_search_returns_route(g, start_node, end_node, h):
	route = search.a_star(g, start_node, end_node, h)
	# Fastest way from n2(id 1) to n8(id 7): n2->n3->n7->n8
	assert route == [1, 2, 6, 7]
Пример #2
0
def test_a_search_end_node_not_in_graph(g, start_node, n, h):
	route = search.a_star(g, start_node, n, h)
	assert route is False