diff options
Diffstat (limited to 'midi_launchpad_mini_integrationtest.py')
-rw-r--r-- | midi_launchpad_mini_integrationtest.py | 19 |
1 files changed, 19 insertions, 0 deletions
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 + |