From 406e06ecfa0391cc3138a33bee0e5e45cb06f6c5 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 1 Jan 2022 21:02:19 +0100 Subject: Added playback volume functionality to launchpad --- midi_launchpad_mini_integrationtest.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'midi_launchpad_mini_integrationtest.py') diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py index ee39182..275bd33 100644 --- a/midi_launchpad_mini_integrationtest.py +++ b/midi_launchpad_mini_integrationtest.py @@ -167,6 +167,24 @@ def test_playbackRateButtons(uut, midiWrapperMock, soloTool, playerMock): midiWrapperMock.simulateInput(button) assert playerMock.rate == playbackRateOptions[button] +def test_playbackVolumeButtons(uut, midiWrapperMock, soloTool, playerMock): + playbackVolumeOptions = { + 0 : 0.125, + 1 : 0.250, + 2 : 0.375, + 3 : 0.500, + 4 : 0.625, + 5 : 0.750, + 6 : 0.875, + 7 : 1.000 + } + uut.connect() + assert playerMock.volume == 1.0 + + for button in playbackVolumeOptions: + midiWrapperMock.simulateInput(button) + assert playerMock.volume == playbackVolumeOptions[button] + def test_unassignedButton(uut, midiWrapperMock): unassignedButton = 48 uut.connect() -- cgit v1.2.3