'Works on disconnected nodes.'

def test_tree_all_pairs_lowest_common_ancestor7(self):

    G = nx.DiGraph()
    G.add_node(1)
    assert_equal({(1, 1): 1}, dict(tree_all_pairs_lca(G)))
    G.add_node(0)
    assert_equal({(1, 1): 1}, dict(tree_all_pairs_lca(G, 1)))
    assert_equal({(0, 0): 0}, dict(tree_all_pairs_lca(G, 0)))
    assert_raises(nx.NetworkXError, list, tree_all_pairs_lca(G))
