From eec04d180aa310e25fec1b877c16834b1363a9d1 Mon Sep 17 00:00:00 2001 From: 0xbyt4 <35742124+0xbyt4@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:30:42 +0300 Subject: [PATCH] fix(test): update play_beep test to match polling-based implementation play_beep was changed from sd.wait() to a poll loop + sd.stop() in 302e1fe but the test was not updated. Now asserts sd.stop() instead of sd.wait(). --- tests/tools/test_voice_mode.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_voice_mode.py b/tests/tools/test_voice_mode.py index c994436843..0312dd046d 100644 --- a/tests/tools/test_voice_mode.py +++ b/tests/tools/test_voice_mode.py @@ -438,10 +438,15 @@ class TestPlayBeep: from tools.voice_mode import play_beep + # play_beep uses polling (get_stream) + sd.stop() instead of sd.wait() + mock_stream = MagicMock() + mock_stream.active = False + mock_sd.get_stream.return_value = mock_stream + play_beep(frequency=880, duration=0.1, count=1) mock_sd.play.assert_called_once() - mock_sd.wait.assert_called_once() + mock_sd.stop.assert_called() # Verify audio data is int16 numpy array audio_arg = mock_sd.play.call_args[0][0] assert audio_arg.dtype == np.int16