aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/test/midi_launchpad_mini_integrationtest.py
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-08-21 18:56:43 +0200
committerEddy Pedroni <epedroni@pm.me>2025-08-21 18:56:43 +0200
commit4ea8344fba863d3ff113cf790b6327d44ced62ee (patch)
tree0db18a3b5039258567d36d782687b83ed0ff9baa /solo-tool-project/test/midi_launchpad_mini_integrationtest.py
parent748f056faf16b08ac41de991b1aeb664f2b86d8e (diff)
Actition controller prototype
Diffstat (limited to 'solo-tool-project/test/midi_launchpad_mini_integrationtest.py')
-rw-r--r--solo-tool-project/test/midi_launchpad_mini_integrationtest.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/solo-tool-project/test/midi_launchpad_mini_integrationtest.py b/solo-tool-project/test/midi_launchpad_mini_integrationtest.py
index 1a99cd4..6841f24 100644
--- a/solo-tool-project/test/midi_launchpad_mini_integrationtest.py
+++ b/solo-tool-project/test/midi_launchpad_mini_integrationtest.py
@@ -1,7 +1,7 @@
import pytest
from mido import Message
-from solo_tool.midi_controller_launchpad_mini import MidiController
+from solo_tool.midi_controller_launchpad_mini import LaunchpadMiniController
from fixtures import soloTool, mockPlayer, testSongs
LED_RED = 3
@@ -38,10 +38,10 @@ class MidiWrapperMock:
def disconnect(self):
self.connectedDevice = None
-
- def sendMessage(self, note, velocity, channel):
+
+ def sendNoteOn(self, note, velocity, channel):
self.sentMessages.append((note, velocity, channel))
-
+
def simulateInput(self, note, velocity=127, channel=0):
if self.callback is not None:
msg = Message("note_on", note=note, velocity=velocity, channel=channel)
@@ -56,7 +56,7 @@ def midiWrapperMock():
@pytest.fixture
def uut(soloTool, midiWrapperMock):
- return MidiController(soloTool, midiWrapperMock)
+ return LaunchpadMiniController(soloTool, midiWrapperMock)
def test_startAndPauseButtons(uut, midiWrapperMock, mockPlayer):
uut.connect()
@@ -65,11 +65,11 @@ def test_startAndPauseButtons(uut, midiWrapperMock, mockPlayer):
midiWrapperMock.simulateInput(playPauseButton)
assert mockPlayer.playing
- assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0)
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LaunchpadMiniController.LED_GREEN, 0)
midiWrapperMock.simulateInput(playPauseButton)
assert not mockPlayer.playing
- assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0)
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LaunchpadMiniController.LED_YELLOW, 0)
def test_startPauseButtonLed(uut, midiWrapperMock, mockPlayer, soloTool):
uut.connect()
@@ -78,11 +78,11 @@ def test_startPauseButtonLed(uut, midiWrapperMock, mockPlayer, soloTool):
mockPlayer.playing = True
mockPlayer.simulatePlayingStateChanged()
- assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0)
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LaunchpadMiniController.LED_GREEN, 0)
mockPlayer.playing = False
mockPlayer.simulatePlayingStateChanged()
- assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0)
+ assert midiWrapperMock.getLatestMessage() == (playPauseButton, LaunchpadMiniController.LED_YELLOW, 0)
def test_jumpToKeyPositionButton(uut, midiWrapperMock, soloTool, mockPlayer, testSongs):
soloTool.addSong(testSongs[0])