Пример #1
0
def test_timeout():
    with pytest.raises(Timeout):
        query_ensembl("rs60", "GRCh37", 0.00001)
Пример #2
0
def test_unknown_rsid():
    with pytest.raises(RuntimeError) as exc:
        query_ensembl("rs5611644432", "GRCh37")
        assert "rsID not found for human" in str(exc)
Пример #3
0
def test_query_ensembl_unknown_build():
    with pytest.raises(NotImplementedError):
        query_ensembl("rs56116432", "unknown")
Пример #4
0
def test_query_multi_alt_grch37():
    assert query_ensembl("rs60",
                         "GRCh37") == QueryResult("A", ["G", "T"], True)
Пример #5
0
def test_query_ensembl_unknown_minor_grch37():
    assert query_ensembl("rs3913290",
                         "GRCh37") == QueryResult("C", ["T"], None)
Пример #6
0
def test_query_ensembl_known_rsid_grch37():
    assert query_ensembl("rs56116432",
                         "GRCh37") == QueryResult("C", ["T"], False)