Skip to content
Merged
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_wordcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,18 @@ def test_top_words_empty_text():
def test_top_words_requires_positive_n():
with pytest.raises(ValueError, match="at least 1"):
top_words("hello", 0)

def test_count_chars_accented_text():
assert count_chars("café") == 4


def test_count_chars_multi_codepoint_emoji():
assert count_chars("❤️") == 2


def test_count_words_accented_text():
assert count_words("café naïve") == 2


def test_count_words_hindi_text():
assert count_words("नमस्ते दुनिया") == 2
Loading