示例#1
0
 def test_value_error_for_negative_counts(self):
     with pytest.raises(ValueError):
         attributable_community_risk(-5, 1, 1, 1)
示例#2
0
 def test_compare_to_formula(self):
     acr_formula = (25 + 10) / 100 - 10 / 50
     acr = attributable_community_risk(25, 25, 10, 40)
     npt.assert_allclose(acr, acr_formula)
示例#3
0
 def test_acr_is_zero(self):
     acr = attributable_community_risk(25, 25, 25, 25)
     assert acr == 0