@@ -1118,7 +1118,7 @@ def parametrize(
1118
1118
It will also override any fixture-function defined scope, allowing
1119
1119
to set a dynamic scope using test context or configuration.
1120
1120
"""
1121
- argnames , parameters = ParameterSet ._for_parametrize (
1121
+ argnames , parametersets = ParameterSet ._for_parametrize (
1122
1122
argnames ,
1123
1123
argvalues ,
1124
1124
self .function ,
@@ -1150,8 +1150,8 @@ def parametrize(
1150
1150
if generated_ids is not None :
1151
1151
ids = generated_ids
1152
1152
1153
- ids = self ._resolve_arg_ids (
1154
- argnames , ids , parameters , nodeid = self .definition .nodeid
1153
+ ids = self ._resolve_parameter_set_ids (
1154
+ argnames , ids , parametersets , nodeid = self .definition .nodeid
1155
1155
)
1156
1156
1157
1157
# Store used (possibly generated) ids with parametrize Marks.
@@ -1163,7 +1163,9 @@ def parametrize(
1163
1163
# of all calls.
1164
1164
newcalls = []
1165
1165
for callspec in self ._calls or [CallSpec2 ()]:
1166
- for param_index , (param_id , param_set ) in enumerate (zip (ids , parameters )):
1166
+ for param_index , (param_id , param_set ) in enumerate (
1167
+ zip (ids , parametersets )
1168
+ ):
1167
1169
newcallspec = callspec .setmulti (
1168
1170
valtypes = arg_values_types ,
1169
1171
argnames = argnames ,
@@ -1176,7 +1178,7 @@ def parametrize(
1176
1178
newcalls .append (newcallspec )
1177
1179
self ._calls = newcalls
1178
1180
1179
- def _resolve_arg_ids (
1181
+ def _resolve_parameter_set_ids (
1180
1182
self ,
1181
1183
argnames : Sequence [str ],
1182
1184
ids : Optional [
@@ -1185,18 +1187,23 @@ def _resolve_arg_ids(
1185
1187
Callable [[Any ], Optional [object ]],
1186
1188
]
1187
1189
],
1188
- parameters : Sequence [ParameterSet ],
1190
+ parametersets : Sequence [ParameterSet ],
1189
1191
nodeid : str ,
1190
1192
) -> List [str ]:
1191
- """Resolve the actual ids for the given argnames, based on the ``ids`` parameter given
1192
- to ``parametrize``.
1193
+ """Resolve the actual ids for the given parameter sets.
1193
1194
1194
- :param List[str] argnames: List of argument names passed to ``parametrize()``.
1195
- :param ids: The ids parameter of the parametrized call (see docs).
1196
- :param List[ParameterSet] parameters: The list of parameter values, same size as ``argnames``.
1197
- :param str str: The nodeid of the item that generated this parametrized call.
1198
- :rtype: List[str]
1199
- :returns: The list of ids for each argname given.
1195
+ :param argnames:
1196
+ Argument names passed to ``parametrize()``.
1197
+ :param ids:
1198
+ The `ids` parameter of the ``parametrize()`` call (see docs).
1199
+ :param parametersets:
1200
+ The parameter sets, each containing a set of values corresponding
1201
+ to ``argnames``.
1202
+ :param nodeid str:
1203
+ The nodeid of the definition item that generated this
1204
+ parametrization.
1205
+ :returns:
1206
+ List with ids for each parameter set given.
1200
1207
"""
1201
1208
if ids is None :
1202
1209
idfn = None
@@ -1206,8 +1213,8 @@ def _resolve_arg_ids(
1206
1213
ids_ = None
1207
1214
else :
1208
1215
idfn = None
1209
- ids_ = self ._validate_ids (ids , parameters , self .function .__name__ )
1210
- return idmaker (argnames , parameters , idfn , ids_ , self .config , nodeid = nodeid )
1216
+ ids_ = self ._validate_ids (ids , parametersets , self .function .__name__ )
1217
+ return idmaker (argnames , parametersets , idfn , ids_ , self .config , nodeid = nodeid )
1211
1218
1212
1219
def _validate_ids (
1213
1220
self ,
0 commit comments