diff options
Diffstat (limited to 'solo_tool_integrationtest.py')
-rw-r--r-- | solo_tool_integrationtest.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py index 927bd2c..22e8143 100644 --- a/solo_tool_integrationtest.py +++ b/solo_tool_integrationtest.py @@ -241,3 +241,25 @@ def test_addInexistentFile(): uut.setSong(0) assert mockPlayer.currentSong == None + +def test_getters(): + song = "test.flac" + abLimit = [0.2, 0.4] + mockPlayer = MockPlayer() + uut = SoloTool(mockPlayer) + + uut.addSong(song) + uut.setSong(0) + uut.addAbLimit(abLimit[0], abLimit[1]) + + assert uut.getSongs() == [song] + + limits = uut.getAbLimits() + assert len(limits) == 1 + assert limits[0][0] == abLimit[0] + assert limits[0][1] == abLimit[1] + + mockPlayer.position = 0.8 + assert uut.getPlaybackPosition() == 0.8 + + |