Update tests/test_string_utils.py
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 42s

This commit is contained in:
2025-07-14 13:11:37 +02:00
parent f9b74ebb5a
commit ed8f5ecbdb
+4 -4
View File
@@ -7,16 +7,16 @@ import warnings
def test_uppercase_normal():
# Normal string uppercase conversion
assert string_utils.uppercase("hello") == "HELLO"
assert uppercase("hello") == "HELLO"
def test_uppercase_type_error():
# Raises TypeError when input is None (invalid input)
with pytest.raises(TypeError):
string_utils.uppercase(None)
uppercase(None)
def test_reverse_string():
# Tests string reversal correctness
assert string_utils.reverse("abc") == "cba"
assert reverse("abc") == "cba"
def test_warning_emit():
# Emits a Python UserWarning, checks warning capture
@@ -47,4 +47,4 @@ def test_import_warning():
@pytest.mark.xfail(reason="Expected failure: uppercase does not handle digits")
def test_xfail_uppercase_digits():
# Expected fail test because uppercase won't change digits
assert string_utils.uppercase("abc123") == "ABC1234"
assert uppercase("abc123") == "ABC1234"