Ejemplo n.º 1
0
 def testLCSNoCommonSeq(self):
     self.assertEqual(hw.fancyLCS("cs", "amazing"), [0, '##', '#######'])
Ejemplo n.º 2
0
 def testLCSEmptyString(self):
     self.assertEqual(hw.fancyLCS("", "spam"), [0, '', '####'])
Ejemplo n.º 3
0
 def testLCSSingleChars(self):
     self.assertEqual(hw.fancyLCS("a", "z"), [0, '#', '#'])
Ejemplo n.º 4
0
 def testLCSSamePosition(self):
     self.assertEqual(hw.fancyLCS("hi", "high"), [2, 'hi', 'hi##'])
Ejemplo n.º 5
0
 def testLCSDiffPosition(self):
     self.assertEqual(hw.fancyLCS("abracadabra", "bravery"), [4, '#bra#####r#', 'bra##r#'])
Ejemplo n.º 6
0
 def testLCSSingleChars(self):
     self.assertEqual(hw.fancyLCS("a", "z"), [0, '#', '#'])
Ejemplo n.º 7
0
 def testLCSEmptyString(self):
     self.assertEqual(hw.fancyLCS("", "spam"), [0, '', '####'])
Ejemplo n.º 8
0
 def testLCSDiffPosition(self):
     self.assertEqual(hw.fancyLCS("abracadabra", "bravery"),
                      [4, '#bra#####r#', 'bra##r#'])
Ejemplo n.º 9
0
 def testLCSSamePosition(self):
     self.assertEqual(hw.fancyLCS("hi", "high"), [2, 'hi', 'hi##'])
Ejemplo n.º 10
0
 def testLCSNoCommonSeq(self):
     self.assertEqual(hw.fancyLCS("cs", "amazing"), [0, '##', '#######'])