Skip to content

Commit 135f726

Browse files
committed
add test cases
1 parent 22cc2b2 commit 135f726

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/credibility/test_credibility.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
from mvtk import credibility
66

77

8+
def test_value_error():
9+
try:
10+
credibility.credible_interval(0, 0, prior=(0, 0))
11+
except ValueError:
12+
pass
13+
raise Exception("Expected ValueError")
14+
15+
16+
def test_equivalence():
17+
assert credibility.credible_interval(0, 0) == credibility.credible_interval(
18+
1, 1, prior=(0, 0)
19+
)
20+
21+
822
def test_prob_greater_cmp():
923
nprng = numpy.random.RandomState(0)
1024
prior_sample_size = 10**6

0 commit comments

Comments
 (0)