[core] Add support for module parameters
Parse '-p' parameters and make them accessible via 'parameter()' from within a module (basically, restore the previous configuration facility). Still TODO: Add support for configuration files.
This commit is contained in:
parent
3a531c359f
commit
6adc497f68
4 changed files with 42 additions and 14 deletions
|
@ -28,11 +28,11 @@ class widget(unittest.TestCase):
|
|||
def test_callable_fulltext(self):
|
||||
newWidget = core.widget.Widget(full_text=self.someCallback)
|
||||
self.assertEqual(newWidget.full_text(), self.callbackReturnValue)
|
||||
self.someCallback.assert_called_once_with(unittest.mock.ANY)
|
||||
self.someCallback.assert_called_once_with()
|
||||
|
||||
def test_set_callable_fulltext(self):
|
||||
self.someWidget.full_text(self.someCallback)
|
||||
self.assertEqual(self.someWidget.full_text(), self.callbackReturnValue)
|
||||
self.someCallback.assert_called_once_with(unittest.mock.ANY)
|
||||
self.someCallback.assert_called_once_with()
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue