Update tests/test_math_utils.py
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 43s
Run Pytest with Allure and Coverage Reports / tests (push) Successful in 43s
This commit is contained in:
@@ -19,9 +19,16 @@ def test_call_missing_function():
|
||||
# Accessing a missing function attribute raises AttributeError
|
||||
getattr(math_utils, "non_existent_function")()
|
||||
|
||||
def test_addition_pass():
|
||||
# Test passes: correct addition
|
||||
assert addition(2, 2) == 4
|
||||
@pytest.mark.parametrize(
|
||||
"a, b, expected",
|
||||
[
|
||||
(2, 2, 4),
|
||||
(1, 5, 6),
|
||||
(3, 4, 7),
|
||||
]
|
||||
)
|
||||
def test_addition_pass(a, b, expected):
|
||||
assert addition(a, b) == expected
|
||||
|
||||
def test_addition_fail():
|
||||
# Assertion failure: expected incorrect result
|
||||
|
||||
Reference in New Issue
Block a user