示例#1
0
def test_get_suite_jobs_auths(monkeypatch, cycle_name_tuples, job_platform_map,
                              expect):
    monkeypatch.setattr(cylc.rose.platform_utils,
                        'get_platforms_from_task_jobs',
                        lambda _, cycle: job_platform_map[cycle])
    for item in CylcProcessor().get_suite_jobs_auths('suite_name',
                                                     cycle_name_tuples):
        assert item in expect
示例#2
0
def test_get_task_auth(monkeypatch, platform, expect):
    def fake_get_platform(*_):
        if platform is None:
            raise KeyError
        else:
            return platform

    monkeypatch.setattr(cylc.rose.platform_utils, 'get_platform_from_task_def',
                        fake_get_platform)
    assert CylcProcessor().get_task_auth('foo', 'bar') is expect
示例#3
0
文件: bush_dao.py 项目: rolinzcy/rose
 def parse_job_log_rel_path(cls, f_name):
     """Return (cycle, task, submit_num, ext)."""
     return CylcProcessor.parse_job_log_rel_path(f_name)
示例#4
0
文件: bush_dao.py 项目: rolinzcy/rose
    def get_suite_dir_rel(suite_name, *paths):
        """Return the relative path to the suite running directory.

        paths -- if specified, are added to the end of the path.
        """
        return CylcProcessor.get_suite_dir_rel(suite_name, *paths)