def test_winner_player_two(self): game = TieBreakGame("player 1", "player 2") for _ in range(self.MINIMUM_POINTS + self.MINIMUM_LEAD): game.point_won_by("player 2") self.assertEqual(game.winner(), "player 2")
def test_player_two_wins_closest_possible_tiebreaker(self): game = TieBreakGame("player 1", "player 2") for _ in range(5): game.point_won_by("player 1") for _ in range(7): game.point_won_by("player 2") self.assertEqual(game.winner(), "player 2")
def test_initial_winner(self): game = TieBreakGame("player 1", "player 2") self.assertIsNone(game.winner())