def test_parametrized_with_kwargs(pytester: Pytester) -> None:
    """Test collect parametrized func with wrong number of args."""
    py_file = pytester.makepyfile(
        """
        import pytest

        @pytest.fixture(params=[1,2])
        def a(request):
            return request.param

        @pytest.mark.parametrize(argnames='b', argvalues=[1, 2])
        def test_func(a, b):
            pass
    """
    )

    result = pytester.runpytest(py_file)
    assert result.ret == 0
Test collect parametrized func with wrong number of args.
testing/test_mark.py