[core/input] Separate module/widget update and retrieval
To make it easier to update individual modules, separate the call to update() and the call to actually drawing the status. Additionally, this avoids the "side effect" of updating when drawing the status line.
This commit is contained in:
parent
5810a12944
commit
4e2a645bd3
3 changed files with 15 additions and 14 deletions
|
@ -14,9 +14,6 @@ class i3(unittest.TestCase):
|
|||
widget.full_text.return_value = "test"
|
||||
self.someModule = TestModule(widgets=[widget, widget, widget])
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_start(self):
|
||||
all_data = self.i3.start()
|
||||
data = all_data['data']
|
||||
|
@ -52,6 +49,7 @@ class i3(unittest.TestCase):
|
|||
|
||||
def test_statusline(self):
|
||||
self.i3.modules([ self.someModule, self.someModule, self.someModule ])
|
||||
self.i3.update()
|
||||
data = self.i3.statusline()
|
||||
self.assertEqual(len(self.someModule.widgets())*3, len(data['data']), 'wrong number of widgets')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue