Add CI pipeline for variant 5
Some checks failed
CI / Lint / Ruff (push) Has been cancelled
CI / Test / Pytest coverage (push) Has been cancelled
CI / Build / Poetry package (push) Has been cancelled

This commit is contained in:
lilrax
2026-05-18 00:07:59 +03:00
commit 4544efe463
10 changed files with 477 additions and 0 deletions

14
tests/test_text_tools.py Normal file
View File

@@ -0,0 +1,14 @@
from ci_lab.text_tools import normalize_text, unique_words, word_count
def test_normalize_text_removes_extra_spaces_and_lowers_case() -> None:
assert normalize_text(" Hello WORLD ") == "hello world"
def test_word_count_counts_words() -> None:
assert word_count("Python CI with GitHub Actions") == 5
def test_word_count_returns_zero_for_empty_text() -> None:
assert word_count(" ") == 0
def test_unique_words_returns_only_unique_values() -> None:
assert unique_words("Python python CI") == {"python", "ci"}