コード例 #1
0
ファイル: test_frame.py プロジェクト: Angeall/pyBowling
 def test_get_throwing(self):
     """
     Tests if the get throwing method returns a tuple with all the throwing
     """
     frame = BowlingFrame("test")
     frame.registerThrowing(3)
     self.assertEqual(frame.getThrowing(), (3,))
     frame.registerThrowing(5)
     self.assertEqual(frame.getThrowing(), (3, 5))
コード例 #2
0
ファイル: test_frame.py プロジェクト: Angeall/pyBowling
 def test_get_throwing_ending(self):
     """
     Tests if the get throwing method returns a tuple with all the throwing, even in an ending frame
     """
     frame = BowlingFrame("test", ending=True)
     frame.registerThrowing(3)
     self.assertEqual(frame.getThrowing(), (3,))
     frame.registerThrowing(7)
     self.assertEqual(frame.getThrowing(), (3, 7))
     frame.registerThrowing(6)
     self.assertEqual(frame.getThrowing(), (3, 7, 6))