aboutsummaryrefslogtreecommitdiffstats
path: root/midi_launchpad_mini_integrationtest.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-03 20:29:51 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-03 20:29:51 +0100
commit6b23d5fef7ab1a936e133d620bd277274882b3a7 (patch)
tree063abde114b678bbf64dbe042ef50483c7a2a164 /midi_launchpad_mini_integrationtest.py
parentbfa2abe556269de927e399a0547b18126a78ff96 (diff)
Added playing state callback to player, refactored notifier to use it
Diffstat (limited to 'midi_launchpad_mini_integrationtest.py')
-rw-r--r--midi_launchpad_mini_integrationtest.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py
index 0bb9a82..c10a3f5 100644
--- a/midi_launchpad_mini_integrationtest.py
+++ b/midi_launchpad_mini_integrationtest.py
@@ -94,21 +94,21 @@ def test_startPauseButtonLed(uut, midiWrapperMock, playerMock, soloTool):
assert playerMock.state == PlayerMock.STOPPED
- soloTool.play()
- assert playerMock.state == PlayerMock.PLAYING
+ playerMock.state = PlayerMock.PLAYING
+ playerMock.simulatePlayingStateChanged()
assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0)
- soloTool.stop()
- assert playerMock.state == PlayerMock.STOPPED
+ playerMock.state = PlayerMock.STOPPED
+ playerMock.simulatePlayingStateChanged()
assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0)
- soloTool.pause()
+ playerMock.state = PlayerMock.PAUSED
+ playerMock.simulatePlayingStateChanged()
assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0)
- assert playerMock.state == PlayerMock.PAUSED
- soloTool.play()
+ playerMock.state = PlayerMock.PLAYING
+ playerMock.simulatePlayingStateChanged()
assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0)
- assert playerMock.state == PlayerMock.PLAYING
def test_jumpToAButton(uut, midiWrapperMock, soloTool, playerMock):
ab = (0.5, 0.6)