def setUp(self): config.init() player = NullPlayer() song = AudioFile() song.bookmarks = [(10, "bla")] song.sanitize(fsnative(u"/")) player.song = song self.player = player
def setUp(self): config.init() player = NullPlayer() song = AudioFile() song.bookmarks = [(10, "bla")] song.sanitize(fsnative(u"/")) player.song = song self.player = player self.library = SongLibrary()
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)