def test_playlists_tag(self):
     # Arguably belongs in _audio
     songs = NUMERIC_SONGS
     Playlist._remove_all()
     Playlist._clear_global_cache()
     pl_name="playlist 123!"
     pl = Playlist(self.temp, pl_name)
     pl.extend(songs)
     for song in songs:
         self.assertEquals(pl_name, song("~playlists"))
 def test_playlists_featuring(s):
     Playlist._remove_all()
     Playlist._clear_global_cache()
     pl = Playlist(s.temp, "playlist")
     pl.extend(NUMERIC_SONGS)
     playlists = Playlist.playlists_featuring(NUMERIC_SONGS[0])
     s.failUnlessEqual(playlists, set([pl]))
     # Now add a second one, check that instance tracking works
     pl2 = Playlist(s.temp, "playlist2")
     pl2.append(NUMERIC_SONGS[0])
     playlists = Playlist.playlists_featuring(NUMERIC_SONGS[0])
     s.failUnlessEqual(playlists, set([pl, pl2]))