'Edge betweenness centrality: P4'

def test_normalized_P4(self):

    G = nx.path_graph(4)
    b = nx.edge_betweenness_centrality(G, weight=None, normalized=True)
    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] / 6.0))
