def test_repeat_song_repeats_on_end(self): self.pl.order = RepeatSongForever(OrderInOrder()) self.pl.go_to(3) self.failUnlessEqual(self.pl.current, 3) self.pl.next_ended() self.failUnlessEqual(self.pl.current, 3)
def test_repeat_song_uses_underlying_on_explicit(self): self.pl.order = RepeatSongForever(OrderInOrder()) self.pl.go_to(3) self.pl.next() self.failUnlessEqual(self.pl.current, 4)
def test_shuffle_repeat_forever(self): self.pl.order = RepeatSongForever(OrderShuffle()) old = self.pl.current for i in range(5): self.pl.next_ended() self.assertEqual(self.pl.current, old)