bumblebee-status/tests/test_config.py
Tobi-wan Kenobi a720baf407 [tests] Add Python3 test run
Add testrun to also verify Python3 functionality.

+ Immediately fix a Python3 incompatibility.

see #23
2016-12-03 20:45:52 +01:00

18 lines
589 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(),
list(map(lambda x: { "name": x, "module": x }, self.someSimpleModules)))
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4