Skip to content

Commit fcf1717

Browse files
add test function
1 parent 45fe62f commit fcf1717

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ source = [
278278
branch = true
279279

280280
[tool.coverage.report]
281-
fail_under = 0 # TODO
281+
fail_under = 0 # TODO; old value: 90
282282
skip_empty = true
283283
show_missing = true
284284
exclude_also = [

src/pymc_elicito/__init__.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
"""
2-
Learning prior distributions for model parameters in a Bayesian model based on expert information.
2+
A framework for expert prior elicitation in Python.
3+
4+
Learn prior distributions for parameters in a Bayesian
5+
model based on expert information.
36
"""
47

58
import importlib.metadata
69

710
__version__ = importlib.metadata.version("pymc_elicito")
11+
12+
__all__ = ["hello_world"]
13+
14+
15+
def hello_world() -> str:
16+
"""
17+
Print hello world
18+
19+
Returns
20+
-------
21+
:
22+
hello world
23+
"""
24+
return "hello world"

tests/unit/test_init.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Unit test for __init__.py
3+
"""
4+
5+
from pymc_elicito import hello_world
6+
7+
8+
def test_hello_world():
9+
observed = hello_world()
10+
expected = "hello world"
11+
12+
assert observed == expected

0 commit comments

Comments
 (0)