diff --git a/tests/test_textutils.py b/tests/test_textutils.py index b6acb73..833ee8b 100644 --- a/tests/test_textutils.py +++ b/tests/test_textutils.py @@ -19,6 +19,21 @@ def test_palindrome_ignores_case(): def test_palindrome_ignores_punctuation(): assert is_palindrome("A man, a plan, a canal: Panama") +def test_empty_string_is_palindrome(): + assert is_palindrome("") + + +def test_single_character_is_palindrome(): + assert is_palindrome("a") + + +def test_non_palindrome(): + assert not is_palindrome("hello") + + +def test_palindrome_with_only_spaces(): + assert is_palindrome(" ") + def test_reverse_words_extra_spaces(): assert reverse_words("hello world") == "world hello"