From b93717904ce75c6fc202528d9cf87eaaf3e449e6 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 25 Feb 2025 16:14:25 +0100 Subject: Remove stop functionality from player --- .../test/solo_tool_integrationtest.py | 30 +++++----------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'solo-tool-project/test/solo_tool_integrationtest.py') diff --git a/solo-tool-project/test/solo_tool_integrationtest.py b/solo-tool-project/test/solo_tool_integrationtest.py index fb759b0..f8ed2f1 100644 --- a/solo-tool-project/test/solo_tool_integrationtest.py +++ b/solo-tool-project/test/solo_tool_integrationtest.py @@ -26,17 +26,14 @@ def prepared_tmp_path(tmp_path): return tmp_path def test_playerControls(uut, mockPlayer): - assert mockPlayer.state == MockPlayer.STOPPED - assert uut.playing == False + assert not mockPlayer.playing + assert not uut.playing uut.play() - assert mockPlayer.state == MockPlayer.PLAYING - assert uut.playing == True + assert mockPlayer.playing + assert uut.playing uut.pause() - assert mockPlayer.state == MockPlayer.PAUSED - assert uut.playing == False - uut.stop() - assert mockPlayer.state == MockPlayer.STOPPED - assert uut.playing == False + assert not mockPlayer.playing + assert not uut.playing assert mockPlayer.rate == 1.0 uut.rate = 0.5 @@ -110,7 +107,6 @@ def test_sanitizePlaybackVolume(uut): def test_playingStateNotification(uut, mockPlayer): song = "test.flac" uut.addSong(song) - uut.song = 0 called = False receivedValue = None @@ -121,7 +117,7 @@ def test_playingStateNotification(uut, mockPlayer): uut.registerPlayingStateCallback(callback) - assert mockPlayer.state == MockPlayer.STOPPED + assert not mockPlayer.playing assert not called uut.play() @@ -138,18 +134,6 @@ def test_playingStateNotification(uut, mockPlayer): uut.pause() assert not called - uut.play() - assert called - assert receivedValue == True - called = False - - uut.stop() - assert called - assert receivedValue == False - called = False - uut.stop() - assert not called - def test_playbackVolumeNotification(uut, mockPlayer): song = "test.flac" uut.addSong(song) -- cgit v1.2.3