Example #1
0
 def testFalseNoRepeats(self):
     self.assertFalse(isSubsequence('house', 'houes'))
Example #2
0
 def testFalseRepeats(self):
     self.assertFalse(isSubsequence('abba', 'abcdef'))
Example #3
0
 def testTrueEnds(self):
     self.assertTrue(isSubsequence('aa', 'abba'))
Example #4
0
 def testTrueNotEnds(self):
     self.assertTrue(isSubsequence('happy', 'some happi-nessy was here'))
Example #5
0
 def testBigOfSmall(self):
     self.assertFalse(isSubsequence('abcd', 'abc'))
Example #6
0
 def testEmptyOfEmpty(self):
     self.assertTrue(isSubsequence('', ''))
Example #7
0
 def testNonemptyOfEmpty(self):
     self.assertFalse(isSubsequence('a', ''))