Пример #1
0
 def test_case_12(self):
     self.assertEqual(
         program.longestPalindromicSubstring("z234a5abbba54a32z"),
         "5abbba5")
Пример #2
0
 def test_case_1(self):
     self.assertEqual(program.longestPalindromicSubstring("a"), "a")
Пример #3
0
 def test_case_9(self):
     self.assertEqual(program.longestPalindromicSubstring("abcdefggfedcba"),
                      "abcdefggfedcba")
Пример #4
0
 def test_case_10(self):
     self.assertEqual(
         program.longestPalindromicSubstring(
             "zzzzzzz2345abbbba5432zzbbababa"), "zz2345abbbba5432zz")
Пример #5
0
 def test_case_5(self):
     self.assertEqual(program.longestPalindromicSubstring("abaxyzzyxf"),
                      "xyzzyx")
Пример #6
0
 def test_case_4(self):
     self.assertEqual(
         program.longestPalindromicSubstring("abccbait's highnoon"),
         "abccba")
Пример #7
0
 def test_case_3(self):
     self.assertEqual(
         program.longestPalindromicSubstring("noon high it is"), "noon")
Пример #8
0
 def test_case_2(self):
     self.assertEqual(program.longestPalindromicSubstring("it's highnoon"),
                      "noon")
Пример #9
0
1
import program
2
import unittest
3
​
4
​
5
class TestProgram(unittest.TestCase):
6

7
    def test_case_1(self):
8
        self.assertEqual(program.longestPalindromicSubstring("a"), "a")
9

10
    def test_case_2(self):
11
        self.assertEqual(program.longestPalindromicSubstring("it's highnoon"), "noon")
12

13
    def test_case_3(self):
14
        self.assertEqual(program.longestPalindromicSubstring("noon high it is"), "noon")
15

16