Exemplo n.º 1
0
 def test1(self):
     actual = strings.longest_common_substring('abab', 'baba')
     self.assertEqual(actual, set(['aba', 'bab']))
Exemplo n.º 2
0
 def test3(self):
     actual = strings.longest_common_substring('cacbacabc', 'ccbacabdadca')
     self.assertEqual(actual, set(['cbacab']))
Exemplo n.º 3
0
 def testEmptyStrings(self):
     actual = strings.longest_common_substring('','')
     self.assertEqual(actual, set())
Exemplo n.º 4
0
 def test2(self):
     actual = strings.longest_common_substring('xmjyaux', 'mzjawxu')
     self.assertEqual(actual, set(['x', 'm', 'j', 'a', 'u']))