Exemple #1
0
 def test_one_skittle(self):
     self.assertEqual(compute_bowling_score([5]), 5)
Exemple #2
0
 def test_spare_and_strike(self):
     self.assertEqual(
         compute_bowling_score([10, 3, 7, 5, 3, 5, 5, 7, 2, 5]), 74)
Exemple #3
0
 def test_no_skittle(self):
     self.assertEqual(compute_bowling_score([]), 0)
Exemple #4
0
 def test_multi_strike(self):
     self.assertEqual(compute_bowling_score([10, 10, 10, 10]), 90)
Exemple #5
0
 def test_strike(self):
     self.assertEqual(compute_bowling_score([10, 5, 2]), 24)
Exemple #6
0
 def test_multiple_spare(self):
     self.assertEqual(compute_bowling_score([5, 5, 2, 8, 5]), 32)
Exemple #7
0
 def test_spare(self):
     self.assertEqual(compute_bowling_score([5, 5, 2]), 14)
Exemple #8
0
 def test_multiple_skittle(self):
     self.assertEqual(compute_bowling_score([5, 3, 2, 5, 4, 5]), 24)