def test_valid_rsync_includes_returns_correct_list(tmp_flow_config): """Test that the rsync includes in the correct """ reg = 'rsynctest' flow_file = tmp_flow_config( reg, """ [scheduling] initial cycle point = 2020-01-01 [[dependencies]] graph = "blah => deeblah" [scheduler] install = dir/, dir2/, file1, file2 allow implicit tasks = True """) config = WorkflowConfig(workflow=reg, fpath=flow_file, options=Values()) rsync_includes = WorkflowConfig.get_validated_rsync_includes(config) assert rsync_includes == ['dir/', 'dir2/', 'file1', 'file2']
def test_valid_rsync_includes_returns_correct_list(tmp_path): """Test that the rsync includes in the correct """ flow_cylc_content = """ [scheduling] initial cycle point = 2020-01-01 [[dependencies]] graph = "blah => deeblah" [scheduler] install = dir/, dir2/, file1, file2 allow implicit tasks = True """ flow_cylc = tmp_path.joinpath(WorkflowFiles.FLOW_FILE) flow_cylc.write_text(flow_cylc_content) config = WorkflowConfig(workflow="rsynctest", fpath=flow_cylc, options=Mock(spec=[])) rsync_includes = WorkflowConfig.get_validated_rsync_includes(config) assert rsync_includes == ['dir/', 'dir2/', 'file1', 'file2']