Skip to content

Commit b8bb10f

Browse files
committed
func_name_to_func -> name_to_func
1 parent 03ec5cf commit b8bb10f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

array_api_tests/test_special_cases.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,12 +1165,12 @@ def parse_binary_docstring(docstring: str) -> List[BinaryCase]:
11651165
continue
11661166
if param_names[0] == "x":
11671167
if cases := parse_unary_docstring(stub.__doc__):
1168-
func_name_to_func = {stub.__name__: func}
1168+
name_to_func = {stub.__name__: func}
11691169
if stub.__name__ in func_to_op.keys():
11701170
op_name = func_to_op[stub.__name__]
11711171
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():
11741174
for case in cases:
11751175
id_ = f"{func_name}({case.cond_expr}) -> {case.result_expr}"
11761176
p = pytest.param(func_name, func, case, id=id_)
@@ -1181,19 +1181,19 @@ def parse_binary_docstring(docstring: str) -> List[BinaryCase]:
11811181
continue
11821182
if param_names[0] == "x1" and param_names[1] == "x2":
11831183
if cases := parse_binary_docstring(stub.__doc__):
1184-
func_name_to_func = {stub.__name__: func}
1184+
name_to_func = {stub.__name__: func}
11851185
if stub.__name__ in func_to_op.keys():
11861186
op_name = func_to_op[stub.__name__]
11871187
op = getattr(operator, op_name)
1188-
func_name_to_func[op_name] = op
1188+
name_to_func[op_name] = op
11891189
# We collect inplaceoperator test cases seperately
11901190
iop_name = "__i" + op_name[2:]
11911191
iop = getattr(operator, iop_name)
11921192
for case in cases:
11931193
id_ = f"{iop_name}({case.cond_expr}) -> {case.result_expr}"
11941194
p = pytest.param(iop_name, iop, case, id=id_)
11951195
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():
11971197
for case in cases:
11981198
id_ = f"{func_name}({case.cond_expr}) -> {case.result_expr}"
11991199
p = pytest.param(func_name, func, case, id=id_)

0 commit comments

Comments
 (0)