From 6b23d5fef7ab1a936e133d620bd277274882b3a7 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Mon, 3 Jan 2022 20:29:51 +0100 Subject: Added playing state callback to player, refactored notifier to use it --- midi_launchpad_mini_integrationtest.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'midi_launchpad_mini_integrationtest.py') 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) -- cgit v1.2.3