Skip to content

Commit

Permalink
Add unit test for warn_missing_rvs=False
Browse files Browse the repository at this point in the history
  • Loading branch information
larryshamalama committed Jun 30, 2022
1 parent ee7ad4d commit b6fed3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_joint_logprob.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

import aesara
import aesara.tensor as at
import numpy as np
Expand Down Expand Up @@ -261,6 +263,10 @@ def test_warn_random_not_found():
with pytest.warns(UserWarning):
factorized_joint_logprob({y_rv: y_vv})

with warnings.catch_warnings():
warnings.simplefilter("error")
factorized_joint_logprob({y_rv: y_vv}, warn_missing_rvs=False)


def test_multiple_rvs_to_same_value_raises():
x_rv1 = at.random.normal(name="x1")
Expand Down

0 comments on commit b6fed3b

Please sign in to comment.