

def test_simple_cycles(self):
    G = nx.DiGraph([(0, 0), (0, 1), (0, 2), (1, 2), (2, 0), (2, 1), (2, 2)])
    cc = sorted(nx.simple_cycles(G))
    ca = [[0], [0, 1, 2], [0, 2], [1, 2], [2]]
    for c in cc:
        assert_true(any((self.is_cyclic_permutation(c, rc) for rc in ca)))

dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/tests/test_cycles.py TestCycles.test_simple_cycles/original