def testStringDefaultInterpolation(self): c = Config(spec=Dict(a=String(default="letter a"), aa=String(default="a {{a}}"))) c.load_data({}) c.resolve() self.assertEqual(c.get("aa"), "a letter a")
def check_app(app): config_path = "apps/{}.yaml".format(app) cfg = Config(filepath=config_path, spec=spec_app).finalize() pprint(dir(cfg)) pprint(cfg.data)
def testCircularDependency(self): c = Config(spec=Dict(a=String())) c.load_data({"a": "a{{a}}a"}) with self.assertRaises(CircularDependency): c.resolve()