def test_get_score(self, p1Points, p2Points, score, p1Name, p2Name): game = TennisGame(p1Name, p2Name) for i in range(p1Points): game.won_point(p1Name) for i in range(p2Points): game.won_point(p2Name) assert score == game.score()
def test_Score(self): for testcase in test_cases: (p1Points, p2Points, score, p1Name, p2Name) = testcase game = TennisGame(p1Name, p2Name) for i in range(p1Points): game.won_point(p1Name) for i in range(p2Points): game.won_point(p2Name) self.assertEquals(score, game.score())