[core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order to cleanly refactor the core and the engine, basically start from scratch with the implementation. Goals: * Test coverage * Maintain backwards compatibility with module interface as much as possible (but still make modules easier to code) * Simplicity see #23
This commit is contained in:
parent
20858991b9
commit
a8a6c9bba2
72 changed files with 19 additions and 2155 deletions
|
@ -1,26 +0,0 @@
|
|||
import unittest
|
||||
|
||||
import bumblebee.config
|
||||
import bumblebee.modules.cpu
|
||||
|
||||
class FakeOutput(object):
|
||||
def add_callback(self, cmd, button, module=None):
|
||||
pass
|
||||
|
||||
class TestCpuModule(unittest.TestCase):
|
||||
def setUp(self):
|
||||
output = FakeOutput()
|
||||
config = bumblebee.config.Config(["-m", "cpu"])
|
||||
self.cpu = bumblebee.modules.cpu.Module(output, config, None)
|
||||
|
||||
def test_documentation(self):
|
||||
self.assertTrue(hasattr(bumblebee.modules.cpu, "description"))
|
||||
self.assertTrue(hasattr(bumblebee.modules.cpu, "parameters"))
|
||||
|
||||
def test_warning(self):
|
||||
self.assertTrue(hasattr(self.cpu, "warning"))
|
||||
|
||||
def test_critical(self):
|
||||
self.assertTrue(hasattr(self.cpu, "critical"))
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
Loading…
Add table
Add a link
Reference in a new issue