From c2c5e66733d33c8ae5b07a47f4b0697128bf92a2 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Tue, 15 Jul 2025 13:10:19 +0200 Subject: [PATCH] Update tests/test_math_utils.py --- tests/test_math_utils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_math_utils.py b/tests/test_math_utils.py index e3a29da0e..3043ee279 100644 --- a/tests/test_math_utils.py +++ b/tests/test_math_utils.py @@ -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