Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit c3a4162

Browse files
Convert xfail test into a standard unit test
1 parent 4915fdf commit c3a4162

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_transforms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,15 +678,15 @@ def test_discrete_rv_multinary_transform_fails():
678678
joint_logprob(y_rv)
679679

680680

681-
@pytest.mark.xfail(reason="Check not implemented yet, see #51")
682681
def test_invalid_broadcasted_transform_rv_fails():
683682
loc = at.vector("loc")
684683
y_rv = loc + at.random.normal(0, 1, size=2, name="base_rv")
685684
y_rv.name = "y"
686685

687686
logp, (y_vv,) = joint_logprob(y_rv)
688-
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})
689-
assert False, "Should have failed before"
687+
688+
with pytest.raises(TypeError):
689+
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})
690690

691691

692692
@pytest.mark.parametrize("a", (1.0, 2.0))

0 commit comments

Comments
 (0)