예제 #1
0
 def testReadsEmpty(self):
     """
     The reads function must return an empty Reads instance if there are no
     reads for the title.
     """
     titleAlignments = TitleAlignments('subject title', 55)
     self.assertEqual(0, len(titleAlignments.reads()))
예제 #2
0
 def testReadsEmpty(self):
     """
     The reads function must return an empty Reads instance if there are no
     reads for the title.
     """
     titleAlignments = TitleAlignments('subject title', 55)
     self.assertEqual(0, len(list(titleAlignments.reads())))
예제 #3
0
 def testReads(self):
     """
     The reads function must return a Reads instance with the reads for
     the title.
     """
     hsp1 = HSP(7)
     hsp2 = HSP(14)
     hsp3 = HSP(21)
     titleAlignments = TitleAlignments('subject title', 55)
     read1 = Read('id1', 'AAA')
     titleAlignment = TitleAlignment(read1, [hsp1, hsp2])
     titleAlignments.addAlignment(titleAlignment)
     read2 = Read('id2', 'AAA')
     titleAlignment = TitleAlignment(read2, [hsp3])
     titleAlignments.addAlignment(titleAlignment)
     self.assertEqual([read1, read2], list(titleAlignments.reads()))
예제 #4
0
 def testReads(self):
     """
     The reads function must return a Reads instance with the reads for
     the title.
     """
     hsp1 = HSP(7)
     hsp2 = HSP(14)
     hsp3 = HSP(21)
     titleAlignments = TitleAlignments('subject title', 55)
     read1 = Read('id1', 'AAA')
     titleAlignment = TitleAlignment(read1, [hsp1, hsp2])
     titleAlignments.addAlignment(titleAlignment)
     read2 = Read('id2', 'AAA')
     titleAlignment = TitleAlignment(read2, [hsp3])
     titleAlignments.addAlignment(titleAlignment)
     self.assertEqual([read1, read2], list(titleAlignments.reads()))