

def test_cliques_containing_node(self):
    G = self.G
    assert_equal(nx.cliques_containing_node(G, 1), [[2, 6, 1, 3]])
    assert_equal(list(nx.cliques_containing_node(G, [1]).values()), [[[2, 6, 1, 3]]])
    assert_equal(list(nx.cliques_containing_node(G, [1, 2]).values()), [[[2, 6, 1, 3]], [[2, 6, 1, 3], [2, 6, 4]]])
    assert_equal(nx.cliques_containing_node(G, [1, 2]), {
        1: [[2, 6, 1, 3]],
        2: [[2, 6, 1, 3], [2, 6, 4]],
    })
    assert_equal(nx.cliques_containing_node(G, 1), [[2, 6, 1, 3]])
    assert_equal(nx.cliques_containing_node(G, 2), [[2, 6, 1, 3], [2, 6, 4]])
    assert_equal(nx.cliques_containing_node(G, 2, cliques=self.cl), [[2, 6, 1, 3], [2, 6, 4]])
    assert_equal(len(nx.cliques_containing_node(G)), 11)

dataset/ETHPy150Open networkx/networkx/networkx/algorithms/tests/test_clique.py TestCliques.test_cliques_containing_node/original