def add_settings_from_file(config, file_): if file_.exists(): cfg = get_config(file_) if 'mako.directories_list' in cfg: cfg['mako.directories'] = cfg[ 'mako.directories_list'] # pragma: no cover config.add_settings(cfg)
def add_settings_from_file(config, file_): if file_.exists(): cfg = get_config(file_) if 'mako.directories_list' in cfg: cfg['mako.directories'] = cfg['mako.directories_list'] # pragma: no cover config.add_settings(cfg)
def test_get_config(self): from clld.config import get_config cfg = get_config(path(clld.__file__).dirname().joinpath('tests', 'test.ini')) self.assertEqual(cfg['app:main.custom_int'], 5)
def test_get_config(self): from clld.config import get_config cfg = get_config(TESTS_DIR.joinpath('test.ini').as_posix()) self.assertEqual(cfg['app:main.custom_int'], 5)
def test_get_config(self): from clld.config import get_config cfg = get_config( path(clld.__file__).dirname().joinpath('tests', 'test.ini')) self.assertEqual(cfg['app:main.custom_int'], 5)
def test_get_config(testsdir): cfg = get_config(testsdir.joinpath('test.ini')) assert cfg['app:main.custom_int'] == 5