

def test_directed_star(self):
    G = nx.DiGraph()
    G.add_edge(1, 2, weight=0.5)
    G.add_edge(1, 3, weight=0.5)
    grc = nx.global_reaching_centrality
    assert_equal(grc(G, weight='weight', normalized=False), 0.5)
    assert_equal(grc(G, weight='weight', normalized=True), 1)

dataset/ETHPy150Open networkx/networkx/networkx/algorithms/centrality/tests/test_reaching.py TestGlobalReachingCentrality.test_directed_star/original