Skip to content

Commit 1e2a1a6

Browse files
committed
Inline constant parametrization in numba test
1 parent 93e808f commit 1e2a1a6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/link/numba/test_basic.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,27 +333,25 @@ def test_ViewOp():
333333

334334

335335
@pytest.mark.parametrize(
336-
"inputs, op, exc",
336+
"inputs, op",
337337
[
338338
(
339339
[
340340
(pt.matrix(), rng.random(size=(2, 3)).astype(config.floatX)),
341341
(pt.lmatrix(), rng.poisson(size=(2, 3))),
342342
],
343343
MySingleOut,
344-
UserWarning,
345344
),
346345
(
347346
[
348347
(pt.matrix(), rng.random(size=(2, 3)).astype(config.floatX)),
349348
(pt.lmatrix(), rng.poisson(size=(2, 3))),
350349
],
351350
MyMultiOut,
352-
UserWarning,
353351
),
354352
],
355353
)
356-
def test_perform(inputs, op, exc):
354+
def test_fallback_perform(inputs, op):
357355
inputs, test_values = zip(*inputs, strict=True)
358356
g = op()(*inputs)
359357

@@ -362,8 +360,7 @@ def test_perform(inputs, op, exc):
362360
else:
363361
outputs = [g]
364362

365-
cm = contextlib.suppress() if exc is None else pytest.warns(exc)
366-
with cm:
363+
with pytest.warns(UserWarning):
367364
compare_numba_and_py(
368365
inputs,
369366
outputs,

0 commit comments

Comments
 (0)