From dd0da4643a209b99180b8d831b20e5ed75d2678c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 10 Dec 2013 10:16:27 +0100 Subject: [PATCH] clarify that pytest.mark.parametrize() takes a list of argvalues and not just arbitrary iterators. Addresses issue122. --- _pytest/python.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index d4ef14180..8d75804a8 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -140,10 +140,12 @@ def pytest_generate_tests(metafunc): def pytest_configure(config): config.addinivalue_line("markers", "parametrize(argnames, argvalues): call a test function multiple " - "times passing in multiple different argument value sets. Example: " - "@parametrize('arg1', [1,2]) would lead to two calls of the decorated " - "test function, one with arg1=1 and another with arg1=2." - " see http://pytest.org/latest/parametrize.html for more info and " + "times passing in different arguments in turn. argvalues generally " + "needs to be a list of values if argnames specifies only one name " + "or a list of tuples of values if argnames specifies multiple names. " + "Example: @parametrize('arg1', [1,2]) would lead to two calls of the " + "decorated test function, one with arg1=1 and another with arg1=2." + "see http://pytest.org/latest/parametrize.html for more info and " "examples." ) config.addinivalue_line("markers",