'Betweenness centrality: directed path'

def test_directed_path(self):

    G = nx.DiGraph()
    nx.add_path(G, [0, 1, 2])
    b = nx.betweenness_centrality(G, weight=None, normalized=False)
    b_answer = {0: 0.0, 1: 1.0, 2: 0.0}
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n])
