def parametrize(self, argnames, argvalues, indirect=False, ids=None, scope=None):
from _pytest.fixtures import scope2index<EOL>from _pytest.mark import ParameterSet<EOL>argnames, parameters = ParameterSet._for_parametrize(<EOL>argnames,<EOL>argvalues,<EOL>self.function,<EOL>self.config,<EOL>function_definition=self.definition,<EOL>)<EOL>del argvalues<EOL>if scope is None:<EOL><INDENT>scope = _find_parametrized_scope(argnames, self._arg2fixturedefs, indirect)<EOL><DEDENT>self._validate_if_using_arg_names(argnames, indirect)<EOL>arg_values_types = self._resolve_arg_value_types(argnames, indirect)<EOL>ids = self._resolve_arg_ids(argnames, ids, parameters, item=self.definition)<EOL>scopenum = scope2index(<EOL>scope, descr="<STR_LIT>".format(self.function.__name__)<EOL>)<EOL>newcalls = []<EOL>for callspec in self._calls or [CallSpec2(self)]:<EOL><INDENT>for param_index, (param_id, param_set) in enumerate(zip(ids, parameters)):<EOL><INDENT>newcallspec = callspec.copy()<EOL>newcallspec.setmulti2(<EOL>arg_values_types,<EOL>argnames,<EOL>param_set.values,<EOL>param_id,<EOL>param_set.marks,<EOL>scopenum,<EOL>param_index,<EOL>)<EOL>newcalls.append(newcallspec)<EOL><DEDENT><DEDENT>self._calls = newcalls<EOL>
Add new invocations to the underlying test function using the list
        of argvalues for the given argnames.  Parametrization is performed
        during the collection phase.  If you need to setup expensive resources
        see about setting indirect to do it rather at test setup time.

        :arg argnames: a comma-separated string denoting one or more argument
                       names, or a list/tuple of argument strings.

        :arg argvalues: The list of argvalues determines how often a
            test is invoked with different argument values.  If only one
            argname was specified argvalues is a list of values.  If N
            argnames were specified, argvalues must be a list of N-tuples,
            where each tuple-element specifies a value for its respective
            argname.

        :arg indirect: The list of argnames or boolean. A list of arguments'
            names (subset of argnames). If True the list contains all names from
            the argnames. Each argvalue corresponding to an argname in this list will
            be passed as request.param to its respective argname fixture
            function so that it can perform more expensive setups during the
            setup phase of a test rather than at collection time.

        :arg ids: list of string ids, or a callable.
            If strings, each is corresponding to the argvalues so that they are
            part of the test id. If None is given as id of specific test, the
            automatically generated id for that argument will be used.
            If callable, it should take one argument (a single argvalue) and return
            a string or return None. If None, the automatically generated id for that
            argument will be used.
            If no ids are provided they will be generated automatically from
            the argvalues.

        :arg scope: if specified it denotes the scope of the parameters.
            The scope is used for grouping tests by parameter instances.
            It will also override any fixture-function defined scope, allowing
            to set a dynamic scope using test context or configuration.