def test_paired_query_id(): tup = ['query', 'gi|10|else', 90., 80, 60, 2, 30, 80, 1100, 1150, 1e-7, 64.5] blast1 = metagenomics.BlastRecord(*tup) assert metagenomics.paired_query_id(blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/1' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/2' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/3' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == new_blast1
def test_paired_query_id(): tup = ['query', 'gi|10|else', 90., 80, 60, 2, 30, 80, 1100, 1150, 1e-7, 64.5, []] blast1 = metagenomics.BlastRecord(*tup) assert metagenomics.paired_query_id(blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/1' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/2' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == blast1 new_tup = copy.copy(tup) new_tup[0] = 'query/3' new_blast1 = metagenomics.BlastRecord(*new_tup) assert metagenomics.paired_query_id(new_blast1) == new_blast1