tests: yield in wake phrase strategy setup to let tasks start

The strategy schedules background tasks during setup. Fast-running
tests could observe state before those tasks had a chance to run;
yielding once via asyncio.sleep(0) ensures they do.
This commit is contained in:
Aleix Conchillo Flaqué
2026-04-10 17:37:50 -07:00
parent e553bb010f
commit f91a113de7

View File

@@ -33,6 +33,8 @@ class TestWakePhraseUserTurnStartStrategy(unittest.IsolatedAsyncioTestCase):
loop = asyncio.get_running_loop()
task_manager.setup(TaskManagerParams(loop=loop))
await strategy.setup(task_manager)
# The tests are quick, so make sure the schedule starts all tasks.
await asyncio.sleep(0)
return task_manager
async def test_wake_phrase_in_final_transcription(self):