mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-03 03:33:54 +00:00
Update tests/sounds_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4a47ff3679
commit
6eeade706a
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ def test_no_overlap_play(monkeypatch):
|
|||
busy_states_iter = iter([True, False])
|
||||
mock_mixer.get_busy.side_effect = lambda: next(busy_states_iter, False)
|
||||
# Patch os.listdir to return a fake .wav file
|
||||
with mock.patch("os.listdir", return_value=["happy1.wav"]):
|
||||
with mock.patch.object(os, "listdir", return_value=["happy1.wav"]):
|
||||
sound_player = Sounds(volume=0.5, sound_directory=assets_dir, mixer=mock_mixer)
|
||||
result = sound_player.play("happy1.wav", wait_if_playing=True)
|
||||
assert result is True
|
||||
|
|
Loading…
Reference in a new issue