Exemple #1
0
def test_get_info_label_from_freezed(pygame):
    drawer = Drawer(Game())
    player = Player(0, 0, 0)
    player.set_connection(object())
    player.set_freeze()

    assert drawer._get_info_label(player) == 'FREEZE'
Exemple #2
0
def test_get_info_label_from_not_connected_player(pygame):
    drawer = Drawer(Game())
    player = Player(0, 0, 0)

    assert drawer._get_info_label(player) == 'WAIT'
Exemple #3
0
def test_get_info_label_from_connected_player(pygame):
    drawer = Drawer(Game())
    player = Player(0, 0, 0)
    player.set_connection(object())

    assert drawer._get_info_label(player) == ''
Exemple #4
0
def test_get_info_label_from_killed_player(pygame):
    drawer = Drawer(Game())
    player = Player(0, 0, 0)
    player.set_game_over()

    assert drawer._get_info_label(player) == 'KILLED'