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