The correct syntax for multiple parameters is a string of comma-separated names and a list of tuples with values.
Step 2: Evaluate options
@pytest.mark.parametrize('m,n', [(1, 2), (3, 4)]) correctly uses 'm,n' and a list of tuples. @pytest.mark.parametrize(['m', 'n'], [1, 2, 3, 4]) incorrectly uses a list of strings and a flat list. @pytest.mark.parametrize('m', [1, 3])
@pytest.mark.parametrize('n', [2, 4]) is valid syntax but uses two decorators, not a single one. @pytest.mark.parametrize('m,n', 1, 2, 3, 4) has incorrect argument format.
Final Answer:
@pytest.mark.parametrize('m,n', [(1, 2), (3, 4)]) -> Option A
Quick Check:
Parametrize multiple args with string and list of tuples [OK]
Quick Trick:Use string of names and list of tuples for multiple params [OK]
Common Mistakes:
MISTAKES
Passing parameters as separate arguments instead of a list
Using list of strings instead of tuples for values
Confusing multiple decorators with single parametrize
Master "Parametrize" in PyTest
9 interactive learning modes - each teaches the same concept differently