aboutsummaryrefslogtreecommitdiffstats
path: root/playlist_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'playlist_unittest.py')
-rw-r--r--playlist_unittest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/playlist_unittest.py b/playlist_unittest.py
index 685dcb0..b407e4d 100644
--- a/playlist_unittest.py
+++ b/playlist_unittest.py
@@ -13,6 +13,7 @@ def test_addAndSelectOneSong():
uut.setCurrentSong(0)
assert songAddedByUser == songSetByCallback
+ assert uut.getCurrentSong() == 0
def test_addTwoSongsAndSelectBoth():
songAddedByUser = ["/path/to/song", "/path/to/second/song"]
@@ -28,9 +29,11 @@ def test_addTwoSongsAndSelectBoth():
uut.setCurrentSong(0)
assert songAddedByUser[0] == songSetByCallback
+ assert uut.getCurrentSong() == 0
uut.setCurrentSong(1)
assert songAddedByUser[1] == songSetByCallback
+ assert uut.getCurrentSong() == 1
def test_firstAddedSongIsSelected():
songAddedByUser = "/path/to/song"
@@ -44,6 +47,7 @@ def test_firstAddedSongIsSelected():
uut.addSong(songAddedByUser)
assert songAddedByUser == songSetByCallback
+ assert uut.getCurrentSong() == 0
def test_invalidSongSelection():
songAddedByUser = "/path/to/song"
@@ -58,8 +62,10 @@ def test_invalidSongSelection():
uut.setCurrentSong(10)
assert songSetByCallback == None
+ assert uut.getCurrentSong() == None
uut.addSong(songAddedByUser)
uut.setCurrentSong(10)
assert songSetByCallback == songAddedByUser
+ assert uut.getCurrentSong() == 0