def test_config_reader_bad(self): try: cfg = reusables.config_namespace( reusables.join_paths(test_root, "data", "test_bad_config.ini")) except AttributeError: pass else: assert False
def test_config_reader(self): cfg = reusables.config_namespace( reusables.join_paths(test_root, "data", "test_config.ini")) assert isinstance(cfg, reusables.ConfigNamespace) assert cfg.General.example == "A regular string" assert cfg["Section 2"].list( "exampleList", mod=lambda x: int(x)) == [234, 123, 234, 543]
def test_get_config_namespace(self): resp = reusables.config_namespace( os.path.join(test_root, 'test_config.cfg')) assert resp.Section1.key2 == 'Value2', str(resp.Section1)
def test_get_config_namespace(self): resp = reusables.config_namespace(os.path.join(test_root, 'test_config.cfg')) assert resp.Section1.key2 == 'Value2', str(resp.Section1)