Example #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
Example #2
0
 def test_is_palindrome_1(self):
     self.assertTrue(is_palindrome(1))
Example #3
0
 def test_is_palindrome_5(self):
     self.assertTrue(is_palindrome(906609))
Example #4
0
 def test_is_palindrome_4(self):
     self.assertFalse(is_palindrome(1201))
Example #5
0
 def test_is_palindrome_3(self):
     self.assertTrue(is_palindrome(12021))
Example #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)