23 lines
536 B
Python
23 lines
536 B
Python
import pytest
|
|
|
|
import pywerwolf
|
|
import pywerwolf.gamelogic as gl
|
|
|
|
def test_game_init():
|
|
g = gl.Game()
|
|
assert g.game_id is not None
|
|
|
|
def test_game_start_next_transition():
|
|
g = gl.Game()
|
|
g.start_game()
|
|
assert g.game_id is not None
|
|
assert g.statemachine.state == gl.GameState.start_game is not None
|
|
|
|
def test_game_start_with_player_not_ready():
|
|
g = gl.Game()
|
|
g.add_player()
|
|
g.start_game()
|
|
assert g.game_id is not None
|
|
assert g.statemachine.state == gl.GameState.waiting_for_players is not None
|
|
|