def test_has_cycle_self_loop(): a = Vertex(Vertex._make_test_vertex()) a.add_edge(Edge(a)) g = Graph([a]) assert g.has_cycle()