def testOverlapping(self): """ If a primer is present twice but is overlapping, only the first instance should be returned. """ seq = Seq('GAAA', IUPAC.unambiguous_dna) self.assertEqual([1], findPrimer('AA', seq))
def testFoundAtEnd(self): """ If a primer is found at the end of a sequence, the correct value must be returned. """ seq = Seq('ACGT', IUPAC.unambiguous_dna) self.assertEqual([2], findPrimer('GT', seq))
def testFoundMultiple(self): """ If a primer is found multiple times, the correct value must be returned. """ seq = Seq('ACGTACGT', IUPAC.unambiguous_dna) self.assertEqual([0, 4], findPrimer('ACG', seq))
def testFoundAtStart(self): """ If a primer is found at the start of a sequence, a list containing 0 must be returned. """ seq = Seq('ACGT', IUPAC.unambiguous_dna) self.assertEqual([0], findPrimer('AC', seq))
def testNotFound(self): """ If a primer is not found, the empty list must be returned. """ seq = Seq('ACGT', IUPAC.unambiguous_dna) self.assertEqual([], findPrimer('BLAH', seq))