def test_create(self):
     config = Config.from_dict({'checkers': { 'WhiteSpaceChecker': '' }})
     checkers = create_checkers(config)
Beispiel #2
0
 def test_default(self):
     config = Config.from_dict({"foo": "bar"})
     self.assertEqual("bar", config["foo"])
Beispiel #3
0
 def test_attribute_with_dash(self):
     config = Config.from_dict({"foo-bar": "quux"})
     self.assertEqual("quux", config.foo_bar)
Beispiel #4
0
 def test_default_chaining(self):
     config = Config.from_dict({"foo": "bar"}).add_from_dict({"baz": "quux"})
     self.assertEqual("quux", config["baz"])
Beispiel #5
0
 def test_attribute_access(self):
     config = Config.from_dict({"foo": "bar"})
     self.assertEqual("bar", config.foo)