Exemple #1
0
 def test_palindrome_case_1(self):
     check_string = "abccba"
     self.assertTrue(check_palindrome(check_string),
                     "String {0} must be palindrome".format(check_string))
 def test_valid_string(self):
     valid_palindrome = 'A man a plan a canal Panama'
     self.assertTrue(pc.check_palindrome(valid_palindrome))
Exemple #3
0
 def test_not_palindrome_case_4(self):
     check_string = "aab"
     self.assertFalse(
         check_palindrome(check_string),
         "String {0} mustn't be palindrome".format(check_string))
 def test_invalid_string(self):
     invalid_palindrome = 'race a car'
     self.assertFalse(pc.check_palindrome(invalid_palindrome))