def test_cylc_site_conf_path_env_var( monkeypatch: Fixture, conf_env: Fixture, capload: Fixture, dummy_version_hierarchy: Fixture, conf_path: Optional[str], site_conf_path: Optional[str], files: List[str], ): """Test that the right files are loaded according to env vars.""" # set the relevant environment variables conf_env('CYLC_CONF_PATH', conf_path) conf_env('CYLC_SITE_CONF_PATH', site_conf_path) # load the global config GlobalConfig.get_inst() assert capload == files
def glbl_cfg(cached=True): """Load and return the global configuration singleton instance.""" from cylc.flow.cfgspec.globalcfg import GlobalConfig return GlobalConfig.get_inst(cached=cached)
def fake_global_conf(tmp_path): glblcfg = GlobalConfig(SPEC) (tmp_path / 'global.cylc').write_text(TEST_CONF) glblcfg.loadcfg(tmp_path / 'global.cylc') return glblcfg