'Betweenness centrality: K4'

def test_K4(self):

    G = nx.complete_graph(4)
    b = edge_current_flow_subset(G, list(G), list(G), normalized=False)
    b_answer = edge_current_flow(G, normalized=False)
    for ((s, t), v1) in b_answer.items():
        v2 = b.get((s, t), b.get((t, s)))
        assert_almost_equal(v1, v2)
    G.add_edge(0, 1, weight=0.5, other=0.3)
    b = edge_current_flow_subset(G, list(G), list(G), normalized=False, weight=None)
    for ((s, t), v1) in b_answer.items():
        v2 = b.get((s, t), b.get((t, s)))
        assert_almost_equal(v1, v2)
    b = edge_current_flow_subset(G, list(G), list(G), normalized=False)
    b_answer = edge_current_flow(G, normalized=False)
    for ((s, t), v1) in b_answer.items():
        v2 = b.get((s, t), b.get((t, s)))
        assert_almost_equal(v1, v2)
    b = edge_current_flow_subset(G, list(G), list(G), normalized=False, weight='other')
    b_answer = edge_current_flow(G, normalized=False, weight='other')
    for ((s, t), v1) in b_answer.items():
        v2 = b.get((s, t), b.get((t, s)))
        assert_almost_equal(v1, v2)
