def quit(): """Quits the game""" global fife if _modules.session is not None and _modules.session.is_alive: _modules.session.end() preload_game_join(preloading) ExtScheduler.destroy_instance() fife.quit()
def cleanup(cls): """ If a test uses manual session management, we cannot be sure that session.end was called before a crash, leaving the game in an unclean state. This method should return the game to a valid state. """ Scheduler.destroy_instance() ExtScheduler.destroy_instance() SPSession._clear_caches()