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