@@ -1165,12 +1165,12 @@ def parse_binary_docstring(docstring: str) -> List[BinaryCase]:
1165
1165
continue
1166
1166
if param_names [0 ] == "x" :
1167
1167
if cases := parse_unary_docstring (stub .__doc__ ):
1168
- func_name_to_func = {stub .__name__ : func }
1168
+ name_to_func = {stub .__name__ : func }
1169
1169
if stub .__name__ in func_to_op .keys ():
1170
1170
op_name = func_to_op [stub .__name__ ]
1171
1171
op = getattr (operator , op_name )
1172
- func_name_to_func [op_name ] = op
1173
- for func_name , func in func_name_to_func .items ():
1172
+ name_to_func [op_name ] = op
1173
+ for func_name , func in name_to_func .items ():
1174
1174
for case in cases :
1175
1175
id_ = f"{ func_name } ({ case .cond_expr } ) -> { case .result_expr } "
1176
1176
p = pytest .param (func_name , func , case , id = id_ )
@@ -1181,19 +1181,19 @@ def parse_binary_docstring(docstring: str) -> List[BinaryCase]:
1181
1181
continue
1182
1182
if param_names [0 ] == "x1" and param_names [1 ] == "x2" :
1183
1183
if cases := parse_binary_docstring (stub .__doc__ ):
1184
- func_name_to_func = {stub .__name__ : func }
1184
+ name_to_func = {stub .__name__ : func }
1185
1185
if stub .__name__ in func_to_op .keys ():
1186
1186
op_name = func_to_op [stub .__name__ ]
1187
1187
op = getattr (operator , op_name )
1188
- func_name_to_func [op_name ] = op
1188
+ name_to_func [op_name ] = op
1189
1189
# We collect inplaceoperator test cases seperately
1190
1190
iop_name = "__i" + op_name [2 :]
1191
1191
iop = getattr (operator , iop_name )
1192
1192
for case in cases :
1193
1193
id_ = f"{ iop_name } ({ case .cond_expr } ) -> { case .result_expr } "
1194
1194
p = pytest .param (iop_name , iop , case , id = id_ )
1195
1195
iop_params .append (p )
1196
- for func_name , func in func_name_to_func .items ():
1196
+ for func_name , func in name_to_func .items ():
1197
1197
for case in cases :
1198
1198
id_ = f"{ func_name } ({ case .cond_expr } ) -> { case .result_expr } "
1199
1199
p = pytest .param (func_name , func , case , id = id_ )
0 commit comments