def test_invalid_target(cid_quantitative_voi: CID) -> None: with pytest.raises(KeyError): quantitative_voi(cid_quantitative_voi, "D", "_")
def test_invalid_node(cid_quantitative_voi: CID) -> None: with pytest.raises(ValueError): quantitative_voi(cid_quantitative_voi, "D", "U")
def test_quantitative_voi(cid_quantitative_voi: CID) -> None: assert set(admits_voi_list(cid_quantitative_voi, "D")) == {"X", "S"} assert quantitative_voi(cid_quantitative_voi, "D", "X") == pytest.approx(0.6) assert quantitative_voi(cid_quantitative_voi, "D", "S") == pytest.approx(0.4)