diff --git a/testing_project/test_logistic.py b/testing_project/test_logistic.py index 100d824..b66d476 100644 --- a/testing_project/test_logistic.py +++ b/testing_project/test_logistic.py @@ -20,6 +20,17 @@ def test_f_corner_cases(): # x=0.5, r=2 => f(x, r)=0.5 +def test_f_other_cases(): + # Test cases are (x, r, expected) + cases = [ + (0.1, 2.2, 0.198), + (0.2, 3.4, 0.544), + (0.5, 2, 0.5) + ] + for x, r, expected in cases: + result = f(x, r) + assert_allclose(result, expected) + # Hands on 2: # parametrize the above test using @pytest.mark.parametrize