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

        @pytest.mark.parametrize('foo, bar', [(1, 2, 3)])
        def test_func(foo, bar):
            pass
    """
    )

    result = pytester.runpytest(py_file)
    result.stdout.fnmatch_lines(
        [
            'test_parametrized_collect_with_wrong_args.py::test_func: in "parametrize" the number of names (2):',
            "  ['foo', 'bar']",
            "must be equal to the number of values (3):",
            "  (1, 2, 3)",
        ]
    )
Test collect parametrized func with wrong number of args.
testing/test_mark.py