From 54f625858011ab3991ed4ce8ff4338f2794ae16b Mon Sep 17 00:00:00 2001 From: Titus Brown Date: Tue, 21 Jul 2009 17:12:59 -0400 Subject: [PATCH] BlastxMapping.__getitem__ should not be a generator. --- tests/blast_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/blast_test.py b/tests/blast_test.py index 843a0214..19d9d529 100644 --- a/tests/blast_test.py +++ b/tests/blast_test.py @@ -407,6 +407,18 @@ def test_translated_seqs_in_results(self): for slice in results: assert slice.seq.id in annodb, '%s not in annodb!' % slice.seq.id + def test_non_consumable_results(self): + blastmap = blast.BlastxMapping(self.prot, verbose=False) + + query_seq = self.dna['gi|171854975|dbj|AB364477.1|'] + results = blastmap[query_seq] + + x = list(results) + y = list(results) + + assert len(x) + assert x == y + class Tblastn_Test(BlastBase): def test_tblastn(self): "tblastn test"