def test_started_after_stopped(self): game = Game(name="TestGame", console=Console(), player=Player("TestPlayer")) with self.assertRaises(GameStoppedException): game.stop() game.start(running_mode='test')
def test_started(self): game = Game(name="TestGame", console=Console(), player=Player("TestPlayer")) game.start(running_mode='test') self.assertEqual(game.running, True)
from game.console import Console from game.core import Game, Player console = Console() player = Player("TestPlayer") game = Game(name="TestGame", console=console, player=player) game.start()