{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/780","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/780/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/780/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/780/events","html_url":"https://github.com/pytest-dev/pytest/pull/780","id":88711439,"number":780,"title":"parametrize: allow Ellipsis to avoid repeating argument list","user":{"login":"mgeier","id":705404,"avatar_url":"https://avatars.githubusercontent.com/u/705404?v=3","gravatar_id":"","url":"https://api.github.com/users/mgeier","html_url":"https://github.com/mgeier","followers_url":"https://api.github.com/users/mgeier/followers","following_url":"https://api.github.com/users/mgeier/following{/other_user}","gists_url":"https://api.github.com/users/mgeier/gists{/gist_id}","starred_url":"https://api.github.com/users/mgeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgeier/subscriptions","organizations_url":"https://api.github.com/users/mgeier/orgs","repos_url":"https://api.github.com/users/mgeier/repos","events_url":"https://api.github.com/users/mgeier/events{/privacy}","received_events_url":"https://api.github.com/users/mgeier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-16T12:24:12Z","updated_at":"2015-06-16T12:59:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/780","html_url":"https://github.com/pytest-dev/pytest/pull/780","diff_url":"https://github.com/pytest-dev/pytest/pull/780.diff","patch_url":"https://github.com/pytest-dev/pytest/pull/780.patch"},"body":"This is an implementation for #518.\r\n\r\nThis is an example for the usage of `parametrize` before this PR:\r\n\r\n```Python\r\nimport pytest\r\n\r\ntestparams = [\r\n    (1, 2, 3, 4, 5, 6, 7, 8),\r\n    (8, 7, 6, 5, 4, 3, 2, 1),\r\n]\r\n\r\n\r\n@pytest.mark.parametrize(\"a, b, c, d, e, f, g, h\", testparams)\r\ndef test_many_args(a, b, c, d, e, f, g, h):\r\n    assert False\r\n```\r\n\r\nThe argument list has to be repeated, which is annoying.\r\nAfter this PR, the argument list can be replaced by `...` (or `Ellipsis`, which also works in Python 2.x):\r\n\r\n```Python\r\nimport pytest\r\n\r\ntestparams = [\r\n    (1, 2, 3, 4, 5, 6, 7, 8),\r\n    (8, 7, 6, 5, 4, 3, 2, 1),\r\n]\r\n\r\n\r\n@pytest.mark.parametrize(..., testparams)\r\ndef test_many_args(a, b, c, d, e, f, g, h):\r\n    assert False\r\n```\r\n\r\nThe auto-deduced parameters must be in the beginning of the parameter list, but any other parameters can be used afterwards, e.g. a fixture:\r\n\r\n```Python\r\nimport pytest\r\n\r\ntestparams = [\r\n    (1, 2, 3, 4, 5, 6, 7, 8),\r\n    (8, 7, 6, 5, 4, 3, 2, 1),\r\n]\r\n\r\n\r\n@pytest.fixture\r\ndef myfixture():\r\n    pass\r\n\r\n\r\n@pytest.mark.parametrize(..., testparams)\r\ndef test_many_args_and_fixture(a, b, c, d, e, f, g, h, myfixture):\r\n    assert False\r\n```"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/112419055","html_url":"https://github.com/pytest-dev/pytest/pull/780#issuecomment-112419055","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/780","id":112419055,"user":{"login":"mgeier","id":705404,"avatar_url":"https://avatars.githubusercontent.com/u/705404?v=3","gravatar_id":"","url":"https://api.github.com/users/mgeier","html_url":"https://github.com/mgeier","followers_url":"https://api.github.com/users/mgeier/followers","following_url":"https://api.github.com/users/mgeier/following{/other_user}","gists_url":"https://api.github.com/users/mgeier/gists{/gist_id}","starred_url":"https://api.github.com/users/mgeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgeier/subscriptions","organizations_url":"https://api.github.com/users/mgeier/orgs","repos_url":"https://api.github.com/users/mgeier/repos","events_url":"https://api.github.com/users/mgeier/events{/privacy}","received_events_url":"https://api.github.com/users/mgeier/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T12:59:39Z","updated_at":"2015-06-16T12:59:39Z","body":"Thanks for the positive response!\r\n\r\nI'd like to create a test case, but to be honest, I'm a bit overwhelmed with the tests of pytest.\r\nI guess testing a testing framework is a bit too meta for me ...\r\n\r\nCan you give any pointers where I should add a test case?\r\nProbably there are some similar tests already which I can extend?\r\n\r\nI only found `test_keyword_option_parametrize()` in `testing/test_mark.py`, does this have anything to do with it?"}}