def test_end_game2(game): player = Player("user") game.end_game(player) player2 = Player("user2") game.player_acc = 100 game.end_game(player2) assert game.base.rank == {"user": "******", "user2": "100 PLN"}
def test_add_rank(database): if not os.path.exists(database.rank_path): player = Player("user") database.add_result_to_rank(player, 100) database1 = Database() exp_rank = {"user": "******"} assert database1.rank == exp_rank pass
def test_end_game1(game): player = Player("user") game.end_game(player) assert game.base.rank == {"user": "******"}
def test_win_million(game): player = Player("user") game.player_acc = 1000000 game.end_game(player) game2 = Game() assert game2.base.rank == {"user": "******"}
def setup(self): player = Player("user") return player
def test_get_player_nick(self, test_input, expected): player = Player(test_input) assert player.player_nick == expected