@@ -1363,9 +1363,9 @@ def parametrize(
13631363 name2pseudofixturedef = node .stash .setdefault (
13641364 name2pseudofixturedef_key , default
13651365 )
1366- arg_values_types = self ._resolve_arg_value_types (argnames , indirect )
1366+ arg_directness = self ._resolve_args_directness (argnames , indirect )
13671367 for argname in argnames :
1368- if arg_values_types [argname ] == "params " :
1368+ if arg_directness [argname ] == "indirect " :
13691369 continue
13701370 if name2pseudofixturedef is not None and argname in name2pseudofixturedef :
13711371 fixturedef = name2pseudofixturedef [argname ]
@@ -1470,28 +1470,30 @@ def _validate_ids(
14701470
14711471 return list (itertools .islice (ids , num_ids ))
14721472
1473- def _resolve_arg_value_types (
1473+ def _resolve_args_directness (
14741474 self ,
14751475 argnames : Sequence [str ],
14761476 indirect : Union [bool , Sequence [str ]],
1477- ) -> Dict [str , "Literal['params', 'funcargs']" ]:
1478- """Resolve if each parametrized argument must be considered a
1479- parameter to a fixture or a "funcarg" to the function, based on the
1480- ``indirect`` parameter of the parametrized() call.
1477+ ) -> Dict [str , Literal ["indirect" , "direct" ]]:
1478+ """Resolve if each parametrized argument must be considered an indirect
1479+ parameter to a fixture of the same name, or a direct parameter to the
1480+ parametrized function, based on the ``indirect`` parameter of the
1481+ parametrized() call.
14811482
1482- :param List[str] argnames: List of argument names passed to ``parametrize()``.
1483- :param indirect: Same as the ``indirect`` parameter of ``parametrize()``.
1484- :rtype: Dict[str, str]
1485- A dict mapping each arg name to either:
1486- * "params" if the argname should be the parameter of a fixture of the same name.
1487- * "funcargs" if the argname should be a parameter to the parametrized test function .
1483+ :param argnames:
1484+ List of argument names passed to ``parametrize()``.
1485+ :param indirect:
1486+ Same as the ``indirect`` parameter of ``parametrize()``.
1487+ :returns
1488+ A dict mapping each arg name to either "indirect" or "direct" .
14881489 """
1490+ arg_directness : Dict [str , Literal ["indirect" , "direct" ]]
14891491 if isinstance (indirect , bool ):
1490- valtypes : Dict [ str , Literal [ "params" , "funcargs" ]] = dict .fromkeys (
1491- argnames , "params " if indirect else "funcargs "
1492+ arg_directness = dict .fromkeys (
1493+ argnames , "indirect " if indirect else "direct "
14921494 )
14931495 elif isinstance (indirect , Sequence ):
1494- valtypes = dict .fromkeys (argnames , "funcargs " )
1496+ arg_directness = dict .fromkeys (argnames , "direct " )
14951497 for arg in indirect :
14961498 if arg not in argnames :
14971499 fail (
@@ -1500,15 +1502,15 @@ def _resolve_arg_value_types(
15001502 ),
15011503 pytrace = False ,
15021504 )
1503- valtypes [arg ] = "params "
1505+ arg_directness [arg ] = "indirect "
15041506 else :
15051507 fail (
15061508 "In {func}: expected Sequence or boolean for indirect, got {type}" .format (
15071509 type = type (indirect ).__name__ , func = self .function .__name__
15081510 ),
15091511 pytrace = False ,
15101512 )
1511- return valtypes
1513+ return arg_directness
15121514
15131515 def _validate_if_using_arg_names (
15141516 self ,
0 commit comments