Fix test_previous_track_with_consume

This commit is contained in:
Thomas Adamcik 2010-02-19 23:09:39 +01:00
parent 96a7265537
commit 60a0d182e2
2 changed files with 4 additions and 4 deletions

View File

@ -117,14 +117,14 @@ class BasePlaybackController(object):
self.stop()
def next(self):
if self.consume:
self.backend.current_playlist.remove(self.current_track)
if not self.next_track:
self.stop()
else:
self.play(self.next_track)
if self.consume:
self.backend.current_playlist.remove(self.current_track)
def previous(self):
if self.previous_track:
self.play(self.previous_track)

View File

@ -667,7 +667,7 @@ class BasePlaybackControllerTest(object):
self.playback.consume = True
self.playback.play()
self.playback.next()
self.assertEqual(self.playback.current_track, None)
self.assertEqual(self.playback.previous_track, None)
def test_play_with_random(self):
raise NotImplementedError