示例#1
0
def test_retrieve_wrong_url_xml():
    with pytest.raises(ValueError):
        r = ena.retrieve('display=111BAC6&7592=some', fmt='xml')
示例#2
0
def test_retrieve_fasta():
    r = ena.retrieve('BAC67592', fmt='fasta')
    assert r.startswith('>ENA|BAC67592')
示例#3
0
def test_retrieve_many_ids():
    with pytest.raises(ValueError):
        r = ena.retrieve('BAC67592 BAC67593 BAC67580')
示例#4
0
def test_retrieve_invalid_id():
    with pytest.raises(ValueError):
        r = ena.retrieve('111BAC67592')
示例#5
0
def test_retrieve_embl():
    r = ena.retrieve('BAC67592', fmt='text')
    assert r.startswith('ID   BAC67592;')
示例#6
0
def test_retrieve_fasta_wrong_id():
    with pytest.raises(NoDataError):
        r = ena.retrieve('BAC00000', fmt='fasta')
示例#7
0
def test_retrieve_xml():
    r = ena.retrieve('BAC67592', fmt='xml')
    assert r.startswith('<?xml version="1.0" encoding="UTF-8"?>')