diff --git a/bumblebee/modules/cpu.py b/bumblebee/modules/cpu.py index bf4cbc6..214b205 100644 --- a/bumblebee/modules/cpu.py +++ b/bumblebee/modules/cpu.py @@ -22,7 +22,7 @@ class Module(bumblebee.engine.Module): cmd="gnome-system-monitor") def utilization(self): - return "{:05.02f}%".format(self._utilization) + return "{:06.02f}%".format(self._utilization) def update(self, widgets): self._utilization = psutil.cpu_percent(percpu=False) diff --git a/tests/modules/test_cpu.py b/tests/modules/test_cpu.py index 241656c..e9f56cf 100644 --- a/tests/modules/test_cpu.py +++ b/tests/modules/test_cpu.py @@ -22,7 +22,7 @@ class TestCPUModule(unittest.TestCase): @mock.patch("sys.stdout") def test_format(self, mock_output): for widget in self.module.widgets(): - self.assertEquals(len(widget.full_text()), len("00.00%")) + self.assertEquals(len(widget.full_text()), len("100.00%")) @mock.patch("subprocess.Popen") @mock.patch("sys.stdin")