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