'Tests that the trivial graph has average path length zero,
since there is exactly one path of length zero in the trivial
graph.
For more information, see issue #1960.'

def test_trivial_graph(self):

    G = nx.trivial_graph()
    assert_equal(nx.average_shortest_path_length(G), 0)
