diff options
Diffstat (limited to 'abcontroller_unittest.py')
-rw-r--r-- | abcontroller_unittest.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/abcontroller_unittest.py b/abcontroller_unittest.py index 736ac6b..6e6e779 100644 --- a/abcontroller_unittest.py +++ b/abcontroller_unittest.py @@ -182,8 +182,36 @@ def test_clearAbController(): assert uut.getLimits(s[0]) == None def test_setTemporaryLimits(): - pass + abLimits = [ + AB(0.2, 0.4), + AB(0.3, 0.5), + AB(0.0, 1.2) + ] + uut = ABController() + + for l in abLimits: + uut.setLimits(l.a, l.b) + checkLimits(uut, l.a, l.b) + +def test_setTemporaryLimitsWithCurrentSong(): + songLimits = AB(0.2, 0.4) + abLimits = [ + AB(0.2, 0.4), + AB(0.3, 0.5), + AB(0.0, 1.2) + ] + song = "/path/to/song" + uut = ABController() + uut.setCurrentSong(song) + uut.storeLimits(songLimits.a, songLimits.b) + uut.loadLimits(0) + + for l in abLimits: + uut.setLimits(l.a, l.b) + checkLimits(uut, l.a, l.b) + def test_defaultBehaviour(): uut = ABController() + checkDefaultLimits(uut) |