提交 02b7738d authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Inline constant parametrization in numba test

上级 f85b63ca
...@@ -333,7 +333,7 @@ def test_ViewOp(): ...@@ -333,7 +333,7 @@ def test_ViewOp():
@pytest.mark.parametrize( @pytest.mark.parametrize(
"inputs, op, exc", "inputs, op",
[ [
( (
[ [
...@@ -341,7 +341,6 @@ def test_ViewOp(): ...@@ -341,7 +341,6 @@ def test_ViewOp():
(pt.lmatrix(), rng.poisson(size=(2, 3))), (pt.lmatrix(), rng.poisson(size=(2, 3))),
], ],
MySingleOut, MySingleOut,
UserWarning,
), ),
( (
[ [
...@@ -349,11 +348,10 @@ def test_ViewOp(): ...@@ -349,11 +348,10 @@ def test_ViewOp():
(pt.lmatrix(), rng.poisson(size=(2, 3))), (pt.lmatrix(), rng.poisson(size=(2, 3))),
], ],
MyMultiOut, MyMultiOut,
UserWarning,
), ),
], ],
) )
def test_perform(inputs, op, exc): def test_fallback_perform(inputs, op):
inputs, test_values = zip(*inputs, strict=True) inputs, test_values = zip(*inputs, strict=True)
g = op()(*inputs) g = op()(*inputs)
...@@ -362,8 +360,7 @@ def test_perform(inputs, op, exc): ...@@ -362,8 +360,7 @@ def test_perform(inputs, op, exc):
else: else:
outputs = [g] outputs = [g]
cm = contextlib.suppress() if exc is None else pytest.warns(exc) with pytest.warns(UserWarning):
with cm:
compare_numba_and_py( compare_numba_and_py(
inputs, inputs,
outputs, outputs,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论