Skip to content

Commit c3a6271

Browse files
committed
dnm
1 parent e56364e commit c3a6271

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/array_api_extra/testing.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,20 @@ def wrapper(*args: P.args, **kwargs: P.kwargs) -> T: # numpydoc ignore=PR01,RT0
233233
234234
This allows `pytest.raises` and `pytest.warns` to work as expected.
235235
"""
236+
print(f"calling {func}")
236237
out = func(*args, **kwargs)
237-
238+
print(f"func returned {type(out)}")
239+
out = jax.block_until_ready(out)
240+
print(f"block_until_ready returned {type(out)}")
238241
# Note: `jax.block_until_ready` doesn't reraise exceptions.
239242
if isinstance(out, list | tuple):
240243
for o in out:
241244
o.__array__()
242245
else:
246+
print(f"collecting exceptions on {type(out)}")
243247
out.__array__() # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue]
244248

249+
print(f"returning {type(out)}")
245250
return out # pyright: ignore[reportReturnType]
246251

247252
return wrapper

0 commit comments

Comments
 (0)