Add pylast adapter for --list-deps
This commit is contained in:
parent
4284e08d69
commit
a661b6d848
@ -27,6 +27,7 @@ def format_dependency_list(adapters=None):
|
||||
gstreamer_info,
|
||||
pykka_info,
|
||||
pyspotify_info,
|
||||
pylast_info,
|
||||
]
|
||||
|
||||
lines = []
|
||||
@ -83,3 +84,14 @@ def pyspotify_info():
|
||||
except ImportError:
|
||||
pass
|
||||
return dep_info
|
||||
|
||||
|
||||
def pylast_info():
|
||||
dep_info = {'name': 'pylast'}
|
||||
try:
|
||||
import pylast
|
||||
dep_info['version'] = pylast.__version__
|
||||
dep_info['path'] = pylast.__file__
|
||||
except ImportError:
|
||||
pass
|
||||
return dep_info
|
||||
|
||||
@ -3,6 +3,7 @@ pygst.require('0.10')
|
||||
import gst
|
||||
|
||||
import pykka
|
||||
import pylast
|
||||
import spotify
|
||||
|
||||
from mopidy.utils import deps
|
||||
@ -51,3 +52,10 @@ class DepsTest(unittest.TestCase):
|
||||
self.assertIn('spotify', result['path'])
|
||||
self.assertIn('Built for libspotify API version', result['other'])
|
||||
self.assertIn(str(spotify.api_version), result['other'])
|
||||
|
||||
def test_pylast_info(self):
|
||||
result = deps.pylast_info()
|
||||
|
||||
self.assertEquals('pylast', result['name'])
|
||||
self.assertEquals(pylast.__version__, result['version'])
|
||||
self.assertIn('pylast', result['path'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user