Ejemplo n.º 1
0
 def test_prob1_case_4(self):
     result = prob1.solution(1, 1, 1, [[1, 1, 1]])
     self.assertEqual(result, 0)
Ejemplo n.º 2
0
 def test_prob1_case_2(self):
     result = prob1.solution('xbwwb')
     self.assertEqual(result, 'xwbbw')
Ejemplo n.º 3
0
 def test_prob1_case_3(self):
     result = prob1.solution(2, 2, 2, [[2, 1, 1], [1, 1, 2]])
     self.assertEqual(result, 1)
Ejemplo n.º 4
0
 def test_prob1_case_1(self):
     result = prob1.solution('aaaa')
     self.assertEqual(result, 2)
Ejemplo n.º 5
0
 def test_prob1_case_3(self):
     result = prob1.solution(6, 10, [(0, 1), (0, 2), (1, 2), (1, 3), (1, 4),
                                     (2, 3), (2, 4), (3, 4), (3, 5),
                                     (4, 5)])
     self.assertEqual(result, 4)
Ejemplo n.º 6
0
 def test_prob1_case_2(self):
     result = prob1.solution(4, 4, 0, [])
     self.assertEqual(result, 16)
Ejemplo n.º 7
0
 def test_prob1_case_4(self):
     result = prob1.solution('baaabbabbb')
     self.assertEqual(result, 7)
Ejemplo n.º 8
0
 def test_prob1_case_6(self):
     result = prob1.solution('*?', 'tessdd')
     self.assertEqual(result, True)
Ejemplo n.º 9
0
 def test_prob1_case_3(self):
     result = prob1.solution(3)
     self.assertEqual(result, 3)
Ejemplo n.º 10
0
 def test_prob1_case_4(self):
     result = prob1.solution('t*t', 'tess')
     self.assertEqual(result, False)
Ejemplo n.º 11
0
 def test_prob1_case_5(self):
     result = prob1.solution('t*t', 'tessdddt')
     self.assertEqual(result, True)
Ejemplo n.º 12
0
 def test_prob1_case_2(self):
     result = prob1.solution('t??t', 'test')
     self.assertEqual(result, True)
Ejemplo n.º 13
0
 def test_prob1_case_1(self):
     result = prob1.solution('sch?ol', 'school')
     self.assertEqual(result, True)
Ejemplo n.º 14
0
 def test_prob1_case_1(self):
     result = prob1.solution(10)
     self.assertEqual(result, [6, 4])
Ejemplo n.º 15
0
 def test_prob1_case_5(self):
     result = prob1.solution(5, 3, 1, [[5, 1, 3]])
     self.assertEqual(result, 12)
Ejemplo n.º 16
0
 def test_prob1_case_4(self):
     result = prob1.solution(4)
     self.assertEqual(result, 5)
Ejemplo n.º 17
0
 def test_prob1_case_1(self):
     result = prob1.solution(4, 4, 3, [[2, 2, 3], [3, 1, 4], [4, 4, 4]])
     self.assertEqual(result, 9)
Ejemplo n.º 18
0
 def test_prob1_case_5(self):
     result = prob1.solution(5)
     self.assertEqual(result, 8)
Ejemplo n.º 19
0
 def test_prob1_case_3(self):
     result = prob1.solution('aaabbb')
     self.assertEqual(result, 4)
Ejemplo n.º 20
0
 def test_prob1_case_6(self):
     result = prob1.solution(6)
     self.assertEqual(result, 13)
Ejemplo n.º 21
0
 def test_prob1_case_5(self):
     result = prob1.solution('babba')
     self.assertEqual(result, 5)
Ejemplo n.º 22
0
 def test_prob1_case_7(self):
     result = prob1.solution(7)
     self.assertEqual(result, 21)
Ejemplo n.º 23
0
 def test_prob1_case_2(self):
     result = prob1.solution(4, 6, [(0, 1), (1, 2), (2, 3), (3, 0), (0, 2),
                                    (1, 3)])
     self.assertEqual(result, 3)
Ejemplo n.º 24
0
 def test_prob1_case_2(self):
     result = prob1.solution(2)
     self.assertEqual(result, 2)
Ejemplo n.º 25
0
 def test_prob1_case_4(self):
     result = prob1.solution(4, 1, [(0, 1)])
     self.assertEqual(result, 0)
Ejemplo n.º 26
0
 def test_prob1_case_4(self):
     result = prob1.solution('xxwwwbxwxwbbbwwxxxwwbbbwwwwbb')
     self.assertEqual(result, 'xxwbxwwxbbwwbwbxwbwwxwwwxbbwb')