Skip to content

Commit 6fd8f45

Browse files
committed
add small test
1 parent 54705ae commit 6fd8f45

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/test_testing.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
import pytest
1717

18-
from pymc.testing import Domain
18+
from pymc.testing import Domain, mock_sample
19+
from tests.models import simple_normal
1920

2021

2122
@pytest.mark.parametrize(
@@ -32,3 +33,15 @@
3233
def test_domain(values, edges, expectation):
3334
with expectation:
3435
Domain(values, edges=edges)
36+
37+
38+
def test_mock_sample() -> None:
39+
_, model, _ = simple_normal(bounded_prior=True)
40+
41+
idata = mock_sample(model=model)
42+
43+
assert "posterior" in idata
44+
assert "observed_data" in idata
45+
assert "prior" not in idata
46+
assert "posterior_predictive" not in idata
47+
assert "sample_stats" not in idata

0 commit comments

Comments
 (0)