PyTest - Parametrize
Which of the following is the correct way to apply two
@pytest.mark.parametrize decorators for parameters m and n?@pytest.mark.parametrize decorators for parameters m and n?@pytest.mark.parametrize decorator takes a parameter name and a list of values.m and n is done as in @pytest.mark.parametrize('m', [1, 2])
@pytest.mark.parametrize('n', [3, 4])
def test_func(m, n): pass, but combining parameters in one decorator as in @pytest.mark.parametrize('m, n', [(1, 3), (2, 4)])
def test_func(m, n): pass is also correct and often preferred.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions