[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:
Tobi-wan Kenobi 2016-12-03 20:38:54 +01:00
parent 20858991b9
commit a8a6c9bba2
72 changed files with 19 additions and 2155 deletions

View file

@ -1,10 +1,18 @@
import unittest
import bumblebee.config
from bumblebee.config import Config
class TestConfigCreation(unittest.TestCase):
class TestConfig(unittest.TestCase):
def setUp(self):
pass
self.defaultConfig = Config()
self.someSimpleModules = [ "foo", "bar", "baz" ]
def test_no_modules_by_default(self):
self.assertEquals(self.defaultConfig.modules(), [])
def test_load_simple_modules(self):
cfg = Config([ "-m" ] + self.someSimpleModules)
self.assertEquals(cfg.modules(),
map(lambda x: { "name": x, "module": x }, self.someSimpleModules))
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4