Spaces:
Running
Running
File size: 911 Bytes
630d650 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
from mcp_tox_calc.units import (
normalize_air_concentration,
normalize_csf,
normalize_iur,
normalize_oral_exposure,
)
def test_normalize_oral_exposure_ug_per_kg_day():
out = normalize_oral_exposure(2500, "ug/kg-day", 70)
assert round(out["value_mg_per_kg_day"], 6) == 2.5
def test_normalize_oral_exposure_mg_day_with_bw():
out = normalize_oral_exposure(7, "mg/day", 70)
assert round(out["value_mg_per_kg_day"], 6) == 0.1
def test_normalize_air_concentration_mg_to_ug():
out = normalize_air_concentration(0.2, "mg/m3")
assert round(out["value_ug_per_m3"], 6) == 200.0
def test_normalize_csf_from_ug_basis():
out = normalize_csf(0.001, "(ug/kg-day)^-1")
assert round(out["value_per_mg_per_kg_day"], 6) == 1.0
def test_normalize_iur_from_mg_basis():
out = normalize_iur(0.002, "(mg/m3)^-1")
assert round(out["value_per_ug_per_m3"], 9) == 0.000002
|