コード例 #1
0
ファイル: tests.py プロジェクト: frnhr/bowling_score
 def test_mail_example(self):
     g = Game()
     rolls = [10, 3, 7, 6, 1, 10, 10, 10, 2, 8, 9, 0, 7, 3, 10, 10, 10]
     score = g.full_game(rolls)
     self.assertEqual(score, 193)
コード例 #2
0
ファイル: tests.py プロジェクト: frnhr/bowling_score
 def test_max(self):
     g = Game()
     rolls = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
     score = g.full_game(rolls)
     self.assertEqual(score, 300)
コード例 #3
0
ファイル: tests.py プロジェクト: frnhr/bowling_score
 def test_fail_miserably(self):
     g = Game()
     rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
     score = g.full_game(rolls)
     self.assertEqual(score, 0)
コード例 #4
0
ファイル: tests.py プロジェクト: frnhr/bowling_score
 def test_simple(self):
     g = Game()
     rolls = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
     score = g.full_game(rolls)
     self.assertEqual(score, 30)