Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
    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)
Exemple #4
0
    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)
Exemple #5
0
    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)
Exemple #6
0
def test_get_config(testsdir):
    cfg = get_config(testsdir.joinpath('test.ini'))
    assert cfg['app:main.custom_int'] == 5