Skip to content

Commit c06733e

Browse files
Copilotev-br
andcommitted
Fix pre-existing bugs in make_and() and test_iop()
- Fixed make_and() to use 'and' instead of 'or' (bug mentioned in PR #3) - Fixed test_iop() error message to use 'iop_name' instead of undefined 'func_name' Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
1 parent e8ebe0e commit c06733e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

array_api_tests/test_special_cases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def or_(i: float) -> bool:
9999

100100
def make_and(cond1: UnaryCheck, cond2: UnaryCheck) -> UnaryCheck:
101101
def and_(i: float) -> bool:
102-
return cond1(i) or cond2(i)
102+
return cond1(i) and cond2(i)
103103

104104
return and_
105105

@@ -1337,7 +1337,7 @@ def test_iop(iop_name, iop, case, data):
13371337
res_value = float(res)
13381338

13391339
assert case.check_result(x1_value, x2_value, res_value), (
1340-
f"x1={res}, but should be {case.result_expr} [{func_name}()]\n"
1340+
f"x1={res}, but should be {case.result_expr} [{iop_name}()]\n"
13411341
f"condition: {case}\n"
13421342
f"x1={x1_value}, x2={x2_value}"
13431343
)

0 commit comments

Comments
 (0)