Exemplo n.º 1
0
 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())
Exemplo n.º 2
0
 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())
Exemplo n.º 3
0
 def test_given_2_bic(self):
     mg = MyGraph('i2.txt')
     self.assertFalse(mg.bicolor())
Exemplo n.º 4
0
 def test_test_2_bic(self):
     mg = MyGraph('test.txt')
     self.assertFalse(mg.bicolor())
Exemplo n.º 5
0
 def test_big7_2_bic(self):
     mg = MyGraph('big7.txt')
     self.assertFalse(mg.bicolor())
Exemplo n.º 6
0
 def test_kearn_1_bic(self):
     mg = MyGraph('kearn.txt')
     self.assertTrue(mg.bicolor())
Exemplo n.º 7
0
 def test_given_1_bic(self):
     mg = MyGraph('i1.txt')
     self.assertTrue(mg.bicolor())