'Tests that A* accomodates nodes that are not orderable.
For more information, see issue #554.'

def test_unorderable_nodes(self):

    class Unorderable(object, ):
        def __le__(self):
            raise NotImplemented
        def __ge__(self):
            raise NotImplemented
    nodes = [Unorderable() for n in range(4)]
    G = nx.Graph()
    G.add_edges_from(pairwise(nodes, cyclic=True))
    path = nx.astar_path(G, nodes[0], nodes[2])
    assert_equal(len(path), 3)
