Coverage for backend/ahuora-compounds/ahuora_property_packages/milk/milk_builder.py: 75%

10 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-07-22 05:22 +0000

1from .milk_modular import milk_configuration 

2from ..modular.modular_extended import GenericExtendedParameterBlock 

3 

4from typing import List 

5 

6def build_milk_package(compound_list: List[str]): 

7 if len(compound_list) != 2: 7 ↛ 8line 7 didn't jump to line 8 because the condition on line 7 was never true

8 raise ValueError("Milk package only supports two components: water and milk solids") 

9 for compound in compound_list: 

10 if compound not in ["water", "milk_solid"]: 10 ↛ 11line 10 didn't jump to line 11 because the condition on line 10 was never true

11 raise ValueError(f"Compound {compound} not supported in milk package") 

12 return GenericExtendedParameterBlock(**milk_configuration)