def setUp(self):
     config.init()
     player = NullPlayer()
     song = AudioFile()
     song.bookmarks = [(10, "bla")]
     song.sanitize("/")
     player.song = song
     self.player = player
 def setUp(self):
     config.init()
     player = NullPlayer()
     song = AudioFile()
     song.bookmarks = [(10, "bla")]
     song.sanitize("/")
     player.song = song
     self.player = player
 def test_set_bookmarks_simple(self):
     af = AudioFile()
     af.bookmarks = [(120, "A mark"), (140, "Mark twain")]
     self.failUnlessEqual(af["~bookmark"], "2:00 A mark\n2:20 Mark twain")
 def test_set_bookmarks_none(self):
     af = AudioFile({"bookmark": "foo"})
     af.bookmarks = []
     self.failUnlessEqual([], AudioFile().bookmarks)
     self.failIf("~bookmark" in af)
Esempio n. 5
0
 def test_set_bookmarks_simple(self):
     af = AudioFile()
     af.bookmarks = [(120, "A mark"), (140, "Mark twain")]
     self.failUnlessEqual(af["~bookmark"], "2:00 A mark\n2:20 Mark twain")
Esempio n. 6
0
 def test_set_bookmarks_none(self):
     af = AudioFile({"bookmark": "foo"})
     af.bookmarks = []
     self.failUnlessEqual([], AudioFile().bookmarks)
     self.failIf("~bookmark" in af)