'Betweenness centrality: P3 endpoints'

def test_P3_endpoints(self):

    G = nx.path_graph(3)
    b_answer = {0: 2.0, 1: 3.0, 2: 2.0}
    b = nx.betweenness_centrality(G, weight=None, normalized=False, endpoints=True)
    for n in sorted(G):
        assert_almost_equal(b[n], b_answer[n])
