def runTest(self): k = MyGraph([[0, 1, 0], [0, 2, 1], [0, 3, 2], [1, 2, 3], [1, 3, 4], [2, 3, 5]]) self.assertEqual(k.find_divalent_vertex(), None) l = k.edge_deletion(0) self.assertItemsEqual(l.find_divalent_vertex()[1:], (2, 3))
def runTest(self): k = MyGraph(dart_partitions=[[[1, 2]], [[1, 2]]]) res = k.find_divalent_vertex() self.assertEqual(res, (0, 0, 0))
def runTest(self): k = MyGraph(**self.data["3-gon"]) self.assertItemsEqual(k.find_divalent_vertex(), (0, 1, 2)) self.assertEqual(k.find_divalent_vertex()[0], 0)