Newer
Older
from __future__ import print_function
# Hint: use this script with file:///path/to/local/modules/ in sources.list
# if you want to correctly check all modules.
from weboob.core import Weboob
weboob = Weboob()
weboob.modules_loader.load_all()
backends_without_icons = []
for name, backend in weboob.modules_loader.loaded.items():
path = backend.package.__path__[0]
if not os.path.exists(os.path.join(path, 'test.py')):
if not os.path.exists(os.path.join(path, 'favicon.png')) and \
not os.path.exists(os.path.join(weboob.repositories.icons_dir, '%s.png' % name)) and \
not backend.icon:
backends_without_icons.append(name)
if subprocess.call(['grep', '-q', '-r', 'weboob.deprecated.browser', path]) == 0:
backends_using_deprecated.append(name)
print('Modules without tests: %s' % backends_without_tests)
if backends_without_icons:
print('Modules without icons: %s' % backends_without_icons)
if backends_using_deprecated:
backends_using_deprecated.sort()
print('Modules using deprecated Browser 1: %s' % backends_using_deprecated)
if backends_without_tests or backends_without_icons:
sys.exit(1)