diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2021-12-22 19:59:51 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2021-12-22 19:59:51 +0100 |
commit | 9436fbcb4994779fe1d9a56fc167420eead8a9b7 (patch) | |
tree | cd5ac0503a3f6ac24f24a524f77b85fb5457f43d /solo_tool_integrationtest.py | |
parent | 59b13af09a5e35ea1364eb1031be4ce9410f6f03 (diff) |
Added getter integration test
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 + + |