示例#1
0
def test_create_output_files_dict_wdl_no_md5():
    outmeta = create_output_files_dict(
        'wdl', {'outputs': {
            'arg1': 'path1',
            'arg2': 'path2'
        }})
    assert outmeta == {'arg1': {'path': 'path1'}, 'arg2': {'path': 'path2'}}
示例#2
0
def test_create_output_files_dict_wdl():
    md5dict = {
        'path1': '683153f0051fef9e778ce0866cfd97e9',
        'path2': 'c14105f8209836cd3b1cc1b63b906fed'
    }
    outmeta = create_output_files_dict(
        'wdl', {'outputs': {
            'arg1': 'path1',
            'arg2': 'path2'
        }},
        md5dict=md5dict)
    assert outmeta == {
        'arg1': {
            'path': 'path1',
            'md5sum': md5dict['path1']
        },
        'arg2': {
            'path': 'path2',
            'md5sum': md5dict['path2']
        }
    }
示例#3
0
def test_create_output_files_dict_cwl_secondary_files():
    md5dict = {
        'path1': '683153f0051fef9e778ce0866cfd97e9',
        'path2': 'c14105f8209836cd3b1cc1b63b906fed'
    }
    outmeta = create_output_files_dict(
        'cwl',
        {'arg1': {
            'path': 'path1',
            'secondaryFiles': [{
                'path': 'path2'
            }]
        }},
        md5dict=md5dict)
    assert outmeta == {
        'arg1': {
            'path': 'path1',
            'md5sum': md5dict['path1'],
            'secondaryFiles': [{
                'path': 'path2',
                'md5sum': md5dict['path2']
            }]
        }
    }
示例#4
0
def test_create_output_files_dict_shell():
    outmeta = create_output_files_dict('shell')
    assert outmeta == {}
示例#5
0
def test_create_output_files_dict_snakemake():
    outmeta = create_output_files_dict('snakemake')
    assert outmeta == {}
示例#6
0
def test_create_output_files_dict_wdl_no_execution_metadata():
    with pytest.raises(Exception) as ex:
        outmeta = create_output_files_dict('wdl')
    assert 'execution_metadata' in str(ex.value)