Exemple #1
0
def test_solution():
    assert solution.is_palindrome("racecar") == True
    assert solution.is_palindrome("a") == True
    assert solution.is_palindrome("racecars") == False
    assert solution.is_palindrome("lol") == True
    assert solution.is_palindrome("noon") == True
    assert solution.is_palindrome("at") == False
    assert solution.is_palindrome("shrek") == False
Exemple #2
0
 def test_is_palindrome_1(self):
     self.assertTrue(is_palindrome(1))
Exemple #3
0
 def test_is_palindrome_5(self):
     self.assertTrue(is_palindrome(906609))
Exemple #4
0
 def test_is_palindrome_4(self):
     self.assertFalse(is_palindrome(1201))
Exemple #5
0
 def test_is_palindrome_3(self):
     self.assertTrue(is_palindrome(12021))
Exemple #6
0
 def test_is_palindrome(self):
     self.assertEqual(solution.is_palindrome(self.palindrome_odd), True)
     self.assertEqual(solution.is_palindrome(self.palindrome_even), True)
     self.assertEqual(solution.is_palindrome(self.palindrome), False)