class TestKaiserYeastModel(unittest.TestCase): def setUp(self): self.yeast_model = KaiserYeastModel() def test_get_growth_rate(self): inoculation_rate = 1.0 out = self.yeast_model.get_growth_rate(inoculation_rate) self.assertEquals(round(out, 2), 1.4) inoculation_rate = 2.5 out = self.yeast_model.get_growth_rate(inoculation_rate) self.assertEquals(round(out, 2), 0.66) inoculation_rate = 6.17 out = self.yeast_model.get_growth_rate(inoculation_rate) self.assertEquals(round(out, 2), 0) def test_get_inoculation_rate(self): growth_rate = 4.44 out = self.yeast_model.get_inoculation_rate(growth_rate) self.assertEquals(round(out, 2), 1.4) growth_rate = 1.0 out = self.yeast_model.get_inoculation_rate(growth_rate) self.assertEquals(round(out, 2), 1.99)
def setUp(self): self.yeast_model = KaiserYeastModel()