Complete the code to parametrize the test function with two values for x.
import pytest @pytest.mark.parametrize('x', [[1]]) def test_example(x): assert x > 0
The @pytest.mark.parametrize decorator expects a list of values. Using 1, 2 inside the list creates two values to test.
Complete the code to parametrize the test function with two parameters: x and y.
import pytest @pytest.mark.parametrize([1], [(1, 2), (3, 4)]) def test_sum(x, y): assert x + y > 0
The parameter names must be passed as a single string with names separated by commas inside @pytest.mark.parametrize.
Fix the error in the parametrize decorator to correctly test multiple sets of inputs.
import pytest @pytest.mark.parametrize('x, y', [1]) def test_multiply(x, y): assert x * y >= 0
The values must be a list of tuples, each tuple matching the parameters. Option D correctly provides two tuples.
Fill both blanks to parametrize the test with three sets of inputs and check the sum.
import pytest @pytest.mark.parametrize([1], [2]) def test_sum(x, y): assert x + y == 3
The parameter names must be a string with comma-separated names (option A). The values must be a list of tuples matching the parameters (option B).
Fill all three blanks to parametrize the test with parameters a, b and expected, and check the multiplication result.
import pytest @pytest.mark.parametrize([1], [2]) def test_multiply(a, b, expected): assert a * b == [3]
The parameter names are a string with three names (option A). The values are a list of tuples with three elements each (option B). The assertion compares the product to the expected value (option C).