utils: Include ws4py in --list-deps
This commit is contained in:
parent
9ec53bb3b7
commit
5422d85f5b
@ -36,6 +36,7 @@ def format_dependency_list(adapters=None):
|
||||
dbus_info,
|
||||
serial_info,
|
||||
cherrypy_info,
|
||||
ws4py_info,
|
||||
]
|
||||
|
||||
lines = []
|
||||
@ -201,3 +202,14 @@ def cherrypy_info():
|
||||
except ImportError:
|
||||
pass
|
||||
return dep_info
|
||||
|
||||
|
||||
def ws4py_info():
|
||||
dep_info = {'name': 'ws4py'}
|
||||
try:
|
||||
import ws4py
|
||||
dep_info['version'] = ws4py.__version__
|
||||
dep_info['path'] = ws4py.__file__
|
||||
except ImportError:
|
||||
pass
|
||||
return dep_info
|
||||
|
||||
@ -32,6 +32,11 @@ try:
|
||||
except ImportError:
|
||||
cherrypy = False
|
||||
|
||||
try:
|
||||
import ws4py
|
||||
except ImportError:
|
||||
ws4py = False
|
||||
|
||||
from mopidy.utils import deps
|
||||
|
||||
from tests import unittest
|
||||
@ -128,3 +133,11 @@ class DepsTest(unittest.TestCase):
|
||||
self.assertEquals('cherrypy', result['name'])
|
||||
self.assertEquals(cherrypy.__version__, result['version'])
|
||||
self.assertIn('cherrypy', result['path'])
|
||||
|
||||
@unittest.skipUnless(ws4py, 'ws4py not found')
|
||||
def test_ws4py_info(self):
|
||||
result = deps.ws4py_info()
|
||||
|
||||
self.assertEquals('ws4py', result['name'])
|
||||
self.assertEquals(ws4py.__version__, result['version'])
|
||||
self.assertIn('ws4py', result['path'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user