diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2021-12-26 23:05:46 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2021-12-26 23:05:46 +0100 |
commit | bf232d2f3fa94f374d82464eb66bcc7d72adc3ed (patch) | |
tree | 48daafadce6d643a7fb342178c161ecec5be53fb /abcontroller_unittest.py | |
parent | 8622638f99277b43d40b61029dc3c56164d06cae (diff) |
Added temporary AB limit functionality to back end
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) |