def check_bind2(self):
    sp = self.pygrData.Bio.Seq.Swissprot.sp42()
    hbb = sp['HBB1_TORMA']
    exons = hbb.exons.keys()
    assert len(exons)==1, 'number of expected annotations'
    annoDB = self.pygrData.Bio.Annotation.annoDB()
    exon = annoDB[1]
    assert exons[0] == exon, 'test annotation comparison'
    assert exons[0].pathForward is exon, 'annotation parent match'
    assert exons[0].sequence == hbb[10:50], 'annotation to sequence match'
    onc = sp['HBB1_ONCMY']
    try:
        exons = onc.exons.keys()
        raise ValueError('failed to catch query with no annotations')
    except __HOLE__:
        pass
dataset/ETHPy150Open cjlee112/pygr/tests/metabase_test.py/check_bind2