예제 #1
0
def test_family_class():
    cheese = Prior("CheeseWhiz", holes=0, taste=-10)
    likelihood = Likelihood("Cheese", parent="holes", cheese=cheese)
    family = Family("cheese", likelihood=likelihood, link="ferment")

    for name in ["name", "likelihood", "link"]:
        assert hasattr(family, name)
예제 #2
0
def test_family_class():
    prior = Prior('CheeseWhiz', holes=0, taste=-10)
    family = Family('cheese', prior, link='ferment', parent='holes')
    for name in ['name', 'prior', 'link', 'parent']:
        assert hasattr(family, name)
예제 #3
0
파일: test_priors.py 프로젝트: thatch/bambi
def test_family_class():
    prior = Prior("CheeseWhiz", holes=0, taste=-10)
    family = Family("cheese", prior, link="ferment", parent="holes")
    for name in ["name", "prior", "link", "parent"]:
        assert hasattr(family, name)
예제 #4
0
def test_family_link_unsupported():
    cheese = Prior("CheeseWhiz", holes=0, taste=-10)
    likelihood = Likelihood("Cheese", parent="holes", cheese=cheese)
    family = Family("cheese", likelihood=likelihood, link="ferment")
    with pytest.raises(ValueError):
        family._set_link("Empty")