👋def test_empty_string(self): """Test case 1: Empty string should be a palindrome.""" self.assertTrue(is_palindrome(""))
def test_simple_palindrome(self): """Test case 2: Simple palindrome like 'madam'.""" self.assertTrue(is_palindrome("madam"))
def test_simple_non_palindrome(self): """Test case 3: Simple non-palindrome like 'hello'.""" self.assertFalse(is_palindrome("hello"))
def test_case_insensitive_palindrome(self): """Test case 4: Palindrome with mixed casing.""" self.assertTrue(is_palindrome("Madam"))
def test_palindrome_with_spaces(self): """Test case 5: Palindrome with spaces.""" self.assertTrue(is_palindrome("race car"))
def test_palindrome_with_punctuation(self): """Test case 6: Palindrome with punctuation.""" self.assertTrue(is_palindrome("A man, a plan, a canal: Panama"))
def test_non_palindrome_with_spaces(self): """Test case 7: Non-palindrome with spaces.""" self.assertFalse(is_palindrome("not a palindrome"))
def test_palindrome_with_numbers(self): """Test case 8: Palindrome with numbers.""" self.assertTrue(is_palindrome("12321"))
def test_non_palindrome_with_numbers(self): """Test case 9: Non-palindrome with numbers.""" self.assertFalse(is_palindrome("12345"))
def test_palindrome_with_mixed_characters(self): """Test case 10: Palindrome with mixed characters, numbers and punctuation.""" self.assertTrue(is_palindrome("Racecar!"))