bumblebee-status/tests/test_config.py
Tobi-wan Kenobi a8a6c9bba2 [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
2016-12-03 20:38:54 +01:00

18 lines
583 B
Python

import unittest
from bumblebee.config import Config
class TestConfig(unittest.TestCase):
def setUp(self):
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