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))
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))