Skip to content

Commit 2e44233

Browse files
committed
check limit case requires std 0
1 parent 843b783 commit 2e44233

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

pymc_experimental/tests/distributions/test_multivariate.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,25 @@ def test_failing_mutual_exclusive(self, model: pm.Model):
182182
variables_importance=[1, 1],
183183
)
184184

185-
def test_limit_case_requires_std_0(self):
186-
# TODO: add test for the limit cases that assertions work as expected
187-
return
185+
def test_limit_case_requires_std_0(self, model: pm.Model):
186+
model.add_coord("a", range(2))
187+
with pytest.raises(ValueError, match="Can't have both positive_probs"):
188+
pmx.distributions.R2D2M2CP(
189+
"beta",
190+
1,
191+
[1, 1],
192+
dims="a",
193+
r2=0.8,
194+
positive_probs=[0.5, 0],
195+
positive_probs_std=[0.3, 0.1],
196+
)
197+
with pytest.raises(ValueError, match="Can't have both positive_probs"):
198+
pmx.distributions.R2D2M2CP(
199+
"beta",
200+
1,
201+
[1, 1],
202+
dims="a",
203+
r2=0.8,
204+
positive_probs=[0.5, 1],
205+
positive_probs_std=[0.3, 0.1],
206+
)

0 commit comments

Comments
 (0)