mopidy/tests/local/__init__.py
Thomas Adamcik dc673d554c tests: Ignore deprecated tracklist.add(tracks=...) in local tests
Note, this is mostly because these tests are just core tests in disguise and
need a lot more love than I can give them right now.
2015-03-29 23:11:00 +02:00

20 lines
492 B
Python

from __future__ import absolute_import, unicode_literals
import warnings
def generate_song(i):
return 'local:track:song%s.wav' % i
def populate_tracklist(func):
def wrapper(self):
with warnings.catch_warnings():
warnings.filterwarnings('ignore', 'tracklist.add.*"tracks".*')
self.tl_tracks = self.core.tracklist.add(self.tracks)
return func(self)
wrapper.__name__ = func.__name__
wrapper.__doc__ = func.__doc__
return wrapper