-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Starting with 4.6.0, when passing anything but argnames and argvalues to pytest.mark.parametrize as position arguments, pytest fails during collection with
_pytest/fixtures.py:1145: in _get_direct_parametrize_args
*marker.args, **marker.kwargs
E TypeError: _parse_parametrize_args() takes exactly 2 arguments (4 given)
a minimal example:
import pytest
@pytest.mark.parametrize(["a", "b"], [(1, 2), (3, 4)], False, ["1", "2"])
def test_t_pos(a, b):
assert a + 1 == b
I believe the issue stems from this PR - #5254. The new _parse_parametrize_args method only takes argnames and argvalues as positional arguments and expects all additional arguments to be keywords.
Metadata
Metadata
Assignees
Labels
No labels