'Tests that pairs of vertices adjacent if and only if they are
within the prescribed radius.'

def test_distances(self):

    dist = euclidean
    G = nx.random_geometric_graph(50, 0.25)
    for (u, v) in combinations(G, 2):
        if (v in G[u]):
            assert_true((dist(G.node[u]['pos'], G.node[v]['pos']) <= 0.25))
        else:
            assert_false((dist(G.node[u]['pos'], G.node[v]['pos']) <= 0.25))
