Example #1
0
def test_player_stat():
    player_stat = PlayerStat('test_player')
    assert player_stat
    assert player_stat.__str__() != ''
    assert player_stat.get_worst_ennemy() == ('none', 0)
    assert player_stat.last == 0
    # loss + last
    player_stat.new_play(__get_play(players='test_player=0,first=10'))
    # loss + not last
    player_stat.new_play(__get_play(players='test_player=5,other=10,last=0'))
    assert player_stat.last == 1