def test_calculate_srm_imperial(self): weight = 1.0 # lbs color = 30.0 # degL vol = 5.5 # gal mcu = calculate_mcu(weight, color, vol) srm = calculate_srm(mcu) self.assertEquals(round(srm, 2), 4.78) ebc = srm_to_ebc(srm) self.assertEquals(round(ebc, 2), 9.41)
def test_calculate_srm_metric(self): weight = 1.0 * KG_PER_POUND # kg color = 30.0 # degL vol = 5.5 * LITER_PER_GAL # liter self.assertEquals(round(weight, 2), 0.45) self.assertEquals(round(vol, 2), 20.82) mcu = calculate_mcu(weight, color, vol, units=SI_UNITS) srm = calculate_srm(mcu) self.assertEquals(round(srm, 2), 4.78) ebc = srm_to_ebc(srm) self.assertEquals(round(ebc, 2), 9.41)
def test_srm_to_ebc(self): ebc = srm_to_ebc(3.0) self.assertEquals(round(ebc, 2), 5.91)