'Edge betweenness centrality: P4'

def test_P4(self):

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