Esempio n. 1
0
 def testSuperLCS2(self):
     self.assertEqual(hw.superLCS('hi', 'ship'), [2, '-hi-', 'ship'])
Esempio n. 2
0
 def testSuperLCS4(self):
     studentAnswer = hw.superLCS('cat', 'car')
     self.assertTrue((studentAnswer == [2, 'cat-', 'ca-r']
                      or studentAnswer == [2, 'ca-t', 'car-']),
                     studentAnswer)
Esempio n. 3
0
 def testSuperLCS1(self):
     self.assertEqual(hw.superLCS('spam', ''), [0, 'spam', '----'])
Esempio n. 4
0
 def testSuperLCS3(self):
     studentAnswer = hw.superLCS('x', 'y')
     self.assertTrue((studentAnswer == [0, 'x-', '-y']
                      or studentAnswer == [0, '-x', 'y-']), studentAnswer)
 def testSuperLCS3(self):
   studentAnswer = hw.superLCS('x', 'y')
   self.assertTrue((studentAnswer==[0, 'x-', '-y'] or studentAnswer==[0, '-x', 'y-']), studentAnswer)
 def testSuperLCS2(self):
   self.assertEqual(hw.superLCS('hi', 'ship'), [2, '-hi-', 'ship'])
 def testSuperLCS1(self):
   self.assertEqual(hw.superLCS('spam', ''), [0, 'spam', '----'])
 def testSuperLCS4(self):
   studentAnswer = hw.superLCS('cat', 'car')
   self.assertTrue((studentAnswer==[2, 'cat-', 'ca-r'] or studentAnswer==[2, 'ca-t', 'car-']), studentAnswer)