Skip to content

Commit 7890228

Browse files
Convert xfail test into a standard unit test
1 parent 734908c commit 7890228

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
@@ -676,15 +676,15 @@ def test_discrete_rv_multinary_transform_fails():
676676
joint_logprob(y_rv)
677677

678678

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

685684
logp, (y_vv,) = joint_logprob(y_rv)
686-
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})
687-
assert False, "Should have failed before"
685+
686+
with pytest.raises(TypeError):
687+
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})
688688

689689

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

0 commit comments

Comments
 (0)