Example #1
0
 def test_debug_problem(self):
     input_string = 'abcdaxaxabc'
     got = longest_sequence(input_string)
     expect = 'abcd'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (
         input_string, got, expect)
     self.assertTrue(got == expect, msg)
Example #2
0
 def test_start_problem(self):
     input_string = 'abcdefghijkzcabobobegghabcdefgkabcdefg'
     got = longest_sequence(input_string)
     expect = 'abcdefghijkz'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (
         input_string, got, expect)
     self.assertTrue(got == expect, msg)
Example #3
0
 def test_simple3(self):
     input_string = 'azcabobobegghakl'
     got = longest_sequence(input_string)
     expect = 'beggh'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (
         input_string, got, expect)
     self.assertTrue(got == expect, msg)
Example #4
0
 def test_debug_problem(self):
     input_string = 'abcdaxaxabc'
     got = longest_sequence(input_string)
     expect = 'abcd'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (input_string, got, expect)
     self.assertTrue(got == expect, msg)
Example #5
0
 def test_start_problem(self):
     input_string = 'abcdefghijkzcabobobegghabcdefgkabcdefg'
     got = longest_sequence(input_string)
     expect = 'abcdefghijkz'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (input_string, got, expect)
     self.assertTrue(got == expect, msg)
Example #6
0
 def test_simple3(self):
     input_string = 'azcabobobegghakl'
     got = longest_sequence(input_string)
     expect = 'beggh'
     msg = "longest_sequence(%s) returned '%s', expected '%s'" % (input_string, got, expect)
     self.assertTrue(got == expect, msg)