示例#1
0
 def test_flip_5(self):
     self.assertEqual(calculate_flips('-+-++----+++++---'), 7)
示例#2
0
 def test_flip_4(self):
     self.assertEqual(calculate_flips('--+-'), 3)
示例#3
0
 def test_flip_3(self):
     self.assertEqual(calculate_flips('+-'), 2)
示例#4
0
 def test_flip_2(self):
     self.assertEqual(calculate_flips('-+'), 1)
示例#5
0
 def test_flip_all_down(self):
     self.assertEqual(calculate_flips('-' * 11), 1)
示例#6
0
 def test_flip_all_down(self):
     self.assertEqual(calculate_flips('+' * 50), 0)