Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)