Exemple #1
0
 def test3(self):
     actual = strings.longest_common_subsequence('cacbacabc', 'ccbacabdadc')
     self.assertEqual(actual, set(['ccbacabc']))
Exemple #2
0
 def test1(self):
     actual = strings.longest_common_subsequence('abab', 'baba')
     self.assertEqual(actual, set(['aba', 'bab']))
Exemple #3
0
 def test2(self):
     actual = strings.longest_common_subsequence('xmjyaux', 'mzjawxu')
     self.assertEqual(actual, set(['mjau', 'mjax']))
Exemple #4
0
 def testEmptyStrings(self):
     actual = strings.longest_common_subsequence('','')
     self.assertEqual(actual, set())