Пример #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())
Пример #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())
Пример #3
0
 def test_given_2_bic(self):
     mg = MyGraph('i2.txt')
     self.assertFalse(mg.bicolor())
Пример #4
0
 def test_test_2_bic(self):
     mg = MyGraph('test.txt')
     self.assertFalse(mg.bicolor())
Пример #5
0
 def test_big7_2_bic(self):
     mg = MyGraph('big7.txt')
     self.assertFalse(mg.bicolor())
Пример #6
0
 def test_kearn_1_bic(self):
     mg = MyGraph('kearn.txt')
     self.assertTrue(mg.bicolor())
Пример #7
0
 def test_given_1_bic(self):
     mg = MyGraph('i1.txt')
     self.assertTrue(mg.bicolor())