Skip to content

Commit 6f112c1

Browse files
committed
🤖 don't generate bytes + ndarray type-tests
1 parent f3ea8f6 commit 6f112c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎tool/testgen.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,10 @@ def _gen_testcases_py_0d(
11911191
name_np = f"{dtype_label(dtype)}_nd"
11921192

11931193
for name_py, pytype in self._scalars_py.items():
1194+
if reflect and pytype is bytes:
1195+
# impossible to reject because of `ndarray.__buffer__`
1196+
continue
1197+
11941198
name1, name2 = (name_py, name_np) if reflect else (name_np, name_py)
11951199

11961200
val_np, val_py = self._get_arrays(dtype, np.dtype(pytype))[0], pytype(1)
@@ -1201,10 +1205,6 @@ def _gen_testcases_py_0d(
12011205
try:
12021206
out = self.opfunc(val1, val2)
12031207
except TypeError:
1204-
if reflect and pytype is bytes:
1205-
# impossible to reject
1206-
continue
1207-
12081208
testcase = " ".join(( # noqa: FLY002
12091209
expr,
12101210
"# type: ignore[operator]",

0 commit comments

Comments
 (0)