def test_command_graph_astar(self):
matches = [
((0, 0), (3, 3)),
((1, 11), (4, 14)),
((8, 12), (11, 15)),
]
regions = utils.serialize_json(matches)
result = self.runner.invoke(
cli.graph,
[regions, '-pm', 'astar', self.image_grid]
)
out = nx.parse_graphml(result.output.strip())
graph = nx.read_graphml(fixtures_path('graph_astar.graphml'))
assert nodeset(out) == nodeset(graph)
assert edgeset(out) == edgeset(graph)
评论列表
文章目录