Skip to content

Commit

Permalink
Convert xfail test into a standard unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Jan 3, 2023
1 parent af07b85 commit ae7c307
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,15 +678,15 @@ def test_discrete_rv_multinary_transform_fails():
joint_logprob(y_rv)


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

logp, (y_vv,) = joint_logprob(y_rv)
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})
assert False, "Should have failed before"

with pytest.raises(TypeError):
logp.eval({y_vv: [0, 0, 0, 0], loc: [0, 0, 0, 0]})


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

0 comments on commit ae7c307

Please sign in to comment.