Exemplo n.º 1
0
def get_project_config(config_path: str = Configuration.get_config_path()
                       ) -> dict:
    """Load the global configuration of the project"""
    project_config_path = os.path.join(
        config_path, Configuration.get_config_project_filename())
    if not io.exists(project_config_path):
        raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT),
                                project_config_path)

    project_config = yaml_lib.read_yaml(project_config_path)

    return _resolve_variables_deep(project_config)
Exemplo n.º 2
0
 def test_get_config_project_filename_default(self):
     self.assertEqual(Configuration.get_config_project_filename(),
                      "project.yaml")
Exemplo n.º 3
0
 def test_get_config_project_filename_configured(self):
     self.assertEqual(Configuration.get_config_project_filename(),
                      "custom-name.yaml")