def test_reload(self): default_color = configs.DFT_CONFIG['color'] a = configs.Config() a.as_global() a.color = False a.bla = 'foo' config.color = not configs.str2bool(default_color) self.assertEqual(config().color, not configs.str2bool(default_color)) b = configs.Config() b.as_global() self.assertEqual(b, config()) self.assertEqual(config().color, configs.str2bool(default_color))
def test_config_content(self): a = configs.Config() a.as_global() self.assertEqual(config().pubsdir, configs.DFT_CONFIG['pubsdir']) self.assertEqual(config().color, configs.str2bool(configs.DFT_CONFIG['color']))