From 27ba3bc396a2da4ffcc39e3e36da5f37df8f628e Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 1 Jan 2022 20:54:15 +0100 Subject: Added playback rate functionality to launchpad --- midi_launchpad_mini_integrationtest.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'midi_launchpad_mini_integrationtest.py') diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py index 8779503..ee39182 100644 --- a/midi_launchpad_mini_integrationtest.py +++ b/midi_launchpad_mini_integrationtest.py @@ -149,6 +149,24 @@ def test_previousAndNextAbButtons(uut, midiWrapperMock, soloTool, playerMock): midiWrapperMock.simulateInput(previousLimitButton) checkLimit(abLimits[0][0], abLimits[0][1]) +def test_playbackRateButtons(uut, midiWrapperMock, soloTool, playerMock): + playbackRateOptions = { + 16 : 0.5, + 17 : 0.6, + 18 : 0.7, + 19 : 0.8, + 20 : 0.9, + 21 : 1.0, + 22 : 1.1, + 23 : 1.2 + } + uut.connect() + assert playerMock.rate == 1.0 + + for button in playbackRateOptions: + midiWrapperMock.simulateInput(button) + assert playerMock.rate == playbackRateOptions[button] + def test_unassignedButton(uut, midiWrapperMock): unassignedButton = 48 uut.connect() @@ -156,3 +174,4 @@ def test_unassignedButton(uut, midiWrapperMock): # expect no crash midiWrapperMock.simulateInput(unassignedButton) # XXX would be better to assert that nothing changed in the solo tool + -- cgit v1.2.3