def testTrimZero(self): """ The trim function must work as expected when the trim quantity is 0. """ ar = AlignedRead('id', '---ACGTACGT--') self.assertTrue(ar.trim(0)) self.assertEqual('ACGTACGT', ar.sequence)
def testTrim(self): """ The trim function must work as expected. """ ar = AlignedRead('id', '---ACGTACGT--') self.assertEqual(8, len(ar)) self.assertTrue(ar.trim(2)) self.assertEqual('GTAC', ar.sequence)
def testTrimWithReadTooShort(self): """ The trim function must return False if the read is too short. """ ar = AlignedRead('id', '---ACGTACGT--') self.assertFalse(ar.trim(4))