Beispiel #1
0
def test_get_bai():
    result = hf.get_bai('T3')
    expected = 'T3' + hf.get_filext('bam_idx')
    assert result == expected
Beispiel #2
0
def test_get_faidx():
    result = hf.get_faidx()
    expected = ['data/fasta/chr22' + e for e in hf.get_filext('fasta_idx')]
    assert result == expected
Beispiel #3
0
def test_get_fasta():
    result = hf.get_fasta()
    expected = 'data/fasta/chr22' + hf.get_filext('fasta')
    assert result == expected
Beispiel #4
0
def test_get_filext__unknownextension_exception():
    with pytest.raises(Exception):
        hf.get_filext('nobodyknowns')
Beispiel #5
0
def test_get_filext(test_input, expected):
    result = hf.get_filext(test_input)
    assert result == expected
Beispiel #6
0
def test_get_filext__unknownextension_exception():
    with pytest.raises(Exception) as exc_info:
        hf.get_filext('nobodyknows')
        assert str(exc_info) == "Unknown input file format 'nobodyknows'."