Fix test_previous_track_with_consume
This commit is contained in:
parent
96a7265537
commit
60a0d182e2
@ -117,14 +117,14 @@ class BasePlaybackController(object):
|
|||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
def next(self):
|
def next(self):
|
||||||
if self.consume:
|
|
||||||
self.backend.current_playlist.remove(self.current_track)
|
|
||||||
|
|
||||||
if not self.next_track:
|
if not self.next_track:
|
||||||
self.stop()
|
self.stop()
|
||||||
else:
|
else:
|
||||||
self.play(self.next_track)
|
self.play(self.next_track)
|
||||||
|
|
||||||
|
if self.consume:
|
||||||
|
self.backend.current_playlist.remove(self.current_track)
|
||||||
|
|
||||||
def previous(self):
|
def previous(self):
|
||||||
if self.previous_track:
|
if self.previous_track:
|
||||||
self.play(self.previous_track)
|
self.play(self.previous_track)
|
||||||
|
|||||||
@ -667,7 +667,7 @@ class BasePlaybackControllerTest(object):
|
|||||||
self.playback.consume = True
|
self.playback.consume = True
|
||||||
self.playback.play()
|
self.playback.play()
|
||||||
self.playback.next()
|
self.playback.next()
|
||||||
self.assertEqual(self.playback.current_track, None)
|
self.assertEqual(self.playback.previous_track, None)
|
||||||
|
|
||||||
def test_play_with_random(self):
|
def test_play_with_random(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user