async def _update_local_games(self): loop = asyncio.get_running_loop() new_list = await loop.run_in_executor(None, local_games_list) notify_list = get_state_changes(self._local_games_cache, new_list) self._local_games_cache = new_list for local_game_notify in notify_list: self.update_local_game_status(local_game_notify)
def test_get_state_changes_unchanged(): old = [LocalGame("1", LocalGameState.Installed)] new = [LocalGame("1", LocalGameState.Installed)] result = [] assert get_state_changes(old, new) == result