def test_given_2_cc(self): mg = MyGraph('i2.txt') self.assertListEqual(mg.conn_components(), [[1, 2, 3], [4, 6, 7, 8], [5]])
def test_given_1_cc(self): mg = MyGraph('i1.txt') self.assertListEqual(mg.conn_components(), [[1, 2, 3, 4, 5], [6, 7, 8, 9]])