[modules/cpu] Add initial version of CPU utilization module

Re-enable the CPU utilization module as proof-of-concept for the new
core engine.

see #23
This commit is contained in:
Tobi-wan Kenobi 2016-12-04 17:45:42 +01:00
parent 8855f1155b
commit aacc56a4e2
9 changed files with 85 additions and 10 deletions

View file

@ -32,14 +32,14 @@ class TestI3BarOutput(unittest.TestCase):
def test_draw_single_widget(self, stdout):
self.output.draw(self.someWidget)
result = json.loads(stdout.getvalue())[0]
self.assertEquals(result["full_text"], self.someWidget.text())
self.assertEquals(result["full_text"], self.someWidget.full_text())
@mock.patch("sys.stdout", new_callable=StringIO)
def test_draw_multiple_widgets(self, stdout):
self.output.draw([self.someWidget, self.someWidget])
result = json.loads(stdout.getvalue())
for res in result:
self.assertEquals(res["full_text"], self.someWidget.text())
self.assertEquals(res["full_text"], self.someWidget.full_text())
@mock.patch("sys.stdout", new_callable=StringIO)
def test_flush(self, stdout):