

def test_selfloops(self):
    self.G.add_edge(1, 1)
    cl = list(nx.find_cliques(self.G))
    rcl = nx.find_cliques_recursive(self.G)
    assert_equal(sorted(map(sorted, cl)), sorted(map(sorted, rcl)))
    assert_equal(cl, [[2, 6, 1, 3], [2, 6, 4], [5, 4, 7], [8, 9], [10, 11]])

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