Skip to content

Commit c414f22

Browse files
committed
🤖 don't generate impossible rejection test-cases
1 parent 56458de commit c414f22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎tool/testgen.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,10 @@ def get_testcases(self) -> Iterable[str | None]:
11641164
try:
11651165
out = self.opfunc(arr1, arr2)
11661166
except TypeError:
1167+
if "O" in dtype1.char + dtype2.char:
1168+
# impossible to reject
1169+
continue
1170+
11671171
testcase = " ".join(( # noqa: FLY002
11681172
op_expr,
11691173
"# type: ignore[operator]",

0 commit comments

Comments
 (0)