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)
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)
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)
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")