[core] make widget name an attribute
first, this fixes #607 also, i think it slightly simplifies code to make "simple" stuff like names, etc. attributes instead of methods all the time. so, expect this to be extended to other components, as well.
This commit is contained in:
parent
2cc463eb1a
commit
9cd9ff626d
7 changed files with 16 additions and 18 deletions
|
@ -97,8 +97,8 @@ class module(unittest.TestCase):
|
|||
cfg = core.config.Config([])
|
||||
module = TestModule(config=cfg, widgets=[self.someWidget, self.anotherWidget])
|
||||
|
||||
self.assertEqual(self.someWidget, module.widget(self.someWidget.name()))
|
||||
self.assertEqual(self.anotherWidget, module.widget(self.anotherWidget.name()))
|
||||
self.assertEqual(self.someWidget, module.widget(self.someWidget.name))
|
||||
self.assertEqual(self.anotherWidget, module.widget(self.anotherWidget.name))
|
||||
self.assertEqual(None, module.widget(self.unusedWidgetName))
|
||||
self.assertEqual(self.someWidget, module.widget())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue