'Weighted betweenness centrality: P3'

def test_P3(self):

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