[all] pylint refinements
Improve code by bringing up the pylint score a bit. see #23
This commit is contained in:
parent
252260c249
commit
0c7884d170
4 changed files with 10 additions and 8 deletions
|
@ -3,8 +3,7 @@
|
|||
import unittest
|
||||
import importlib
|
||||
|
||||
from bumblebee.modules.cpu import Module
|
||||
from bumblebee.engine import modules
|
||||
from bumblebee.engine import all_modules
|
||||
from bumblebee.config import Config
|
||||
from tests.util import assertWidgetAttributes, MockEngine
|
||||
|
||||
|
@ -13,9 +12,9 @@ class TestGenericModules(unittest.TestCase):
|
|||
engine = MockEngine()
|
||||
config = Config()
|
||||
self.objects = {}
|
||||
for mod in modules():
|
||||
for mod in all_modules():
|
||||
cls = importlib.import_module("bumblebee.modules.{}".format(mod["name"]))
|
||||
self.objects[mod["name"]] = getattr(cls, "Module")(engine, { "config": config })
|
||||
self.objects[mod["name"]] = getattr(cls, "Module")(engine, {"config": config})
|
||||
|
||||
def test_widgets(self):
|
||||
for mod in self.objects:
|
||||
|
|
|
@ -19,7 +19,7 @@ class TestModule(unittest.TestCase):
|
|||
self.anyConfigName = "cfg"
|
||||
self.anotherConfigName = "cfg2"
|
||||
self.anyModule = Module(engine=None, widgets=self.widget, config={
|
||||
"name": self.anyConfigName, "config": self.config
|
||||
"name": self.anyConfigName, "config": self.config
|
||||
})
|
||||
self.anotherModule = Module(engine=None, widgets=self.widget, config={
|
||||
"name": self.anotherConfigName, "config": self.config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue