def test_02(self): graph = MyGraph('graph_testinput2.txt') self.assertEqual(graph.get_conn_components(), [['1', '2', '3'], ['4', '6', '7', '8']]) self.assertFalse(graph.bicolor())
def test_01(self): graph = MyGraph('graph_testinput1.txt') self.assertEqual(graph.get_conn_components(), [['1', '2', '3', '4', '5'], ['6', '7', '8', '9']]) self.assertTrue(graph.bicolor())
def test_given_2_bic(self): mg = MyGraph('i2.txt') self.assertFalse(mg.bicolor())
def test_test_2_bic(self): mg = MyGraph('test.txt') self.assertFalse(mg.bicolor())
def test_big7_2_bic(self): mg = MyGraph('big7.txt') self.assertFalse(mg.bicolor())
def test_kearn_1_bic(self): mg = MyGraph('kearn.txt') self.assertTrue(mg.bicolor())
def test_given_1_bic(self): mg = MyGraph('i1.txt') self.assertTrue(mg.bicolor())