def test_defaults_are_not_written(self): """ default values are not written to config file """ fd, path = mkstemp() config = Config(path=path) config.set("option", "value") config.save() with open(path) as f: assert f.read() == "[general]\noption = value\n\n"
def config_set(prop, value): """ Set a Feast properties for the currently active configuration """ try: conf = Config() conf.set(option=prop.strip(), value=value.strip()) conf.save() except Exception as e: _logger.error("Error in reading config file") _logger.exception(e) sys.exit(1)