aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool_integrationtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool_integrationtest.py')
-rw-r--r--solo_tool_integrationtest.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py
index 2ed2449..927bd2c 100644
--- a/solo_tool_integrationtest.py
+++ b/solo_tool_integrationtest.py
@@ -84,16 +84,20 @@ def test_addAndSetSongs():
uut.setSong(i)
assert mockPlayer.currentSong == songs[i]
-def test_addAndSetAbLimit():
+def test_addAndSetAbLimits():
song = "test.flac"
- abLimit = [0.2, 0.4]
+ abLimits = [
+ [0.2, 0.4],
+ [0.1, 0.3]
+ ]
mockPlayer = MockPlayer()
uut = SoloTool(mockPlayer)
uut.addSong(song)
uut.setSong(0)
- uut.addAbLimit(abLimit[0], abLimit[1])
+ uut.addAbLimit(abLimits[0][0], abLimits[0][1])
+ uut.addAbLimit(abLimits[1][0], abLimits[1][1])
mockPlayer.position = 0.0
uut.tick()
@@ -116,6 +120,14 @@ def test_addAndSetAbLimit():
uut.tick()
assert mockPlayer.position == 0.2
+ uut.setAbLimit(1)
+ uut.tick()
+ assert mockPlayer.position == 0.2
+
+ mockPlayer.position = 0.8
+ uut.tick()
+ assert mockPlayer.position == 0.1
+
def test_multipleSongsAndAbLimits():
songs = [
"test.flac",