from unittest import TestCase
class test_bowling_game(TestCase):
def setUp(self):
self.game = BowlingGame()
def test_gutter_game(self):
for roll in range(20):
self.game.roll(0)
self.assertEqual(self.game.score(), 0)
from unittest import TestCase
class test_bowling_game(TestCase):
def setUp(self):
self.game = BowlingGame()
def test_gutter_game(self):
for roll in range(20):
self.game.roll(0)
self.assertEqual(self.game.score(), 0)
def test_all_ones_game(self):
for roll in range(20):
self.game.roll(1)
self.assertEqual(self.game.score(), 20)