Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/test_textutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading