'Tests that :func:`networkx.tournament.hamiltonian_path`
returns a Hamiltonian cycle when provided a strongly connected
tournament.'

def test_hamiltonian_cycle(self):

    G = DiGraph()
    G.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 0), (1, 3), (0, 2)])
    path = hamiltonian_path(G)
    assert_equal(len(path), 4)
    assert_true(all(((v in G[u]) for (u, v) in zip(path, path[1:]))))
    assert_true((path[0] in G[path[(-1)]]))
