def test_timeout(): with pytest.raises(Timeout): query_ensembl("rs60", "GRCh37", 0.00001)
def test_unknown_rsid(): with pytest.raises(RuntimeError) as exc: query_ensembl("rs5611644432", "GRCh37") assert "rsID not found for human" in str(exc)
def test_query_ensembl_unknown_build(): with pytest.raises(NotImplementedError): query_ensembl("rs56116432", "unknown")
def test_query_multi_alt_grch37(): assert query_ensembl("rs60", "GRCh37") == QueryResult("A", ["G", "T"], True)
def test_query_ensembl_unknown_minor_grch37(): assert query_ensembl("rs3913290", "GRCh37") == QueryResult("C", ["T"], None)
def test_query_ensembl_known_rsid_grch37(): assert query_ensembl("rs56116432", "GRCh37") == QueryResult("C", ["T"], False)