Add CI pipeline for variant 5
This commit is contained in:
14
tests/test_text_tools.py
Normal file
14
tests/test_text_tools.py
Normal 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"}
|
||||
Reference in New Issue
Block a user