def test_weight2whole_units_2eggs(self): """Test conversion of grams to whole units (2 eggs)""" self.assertAlmostEquals(EGG.grams2wholeunits(53 * 2.0), 2, 2)
def test_weight2whole_units_halfegg(self): """Test conversion of grams to whole units (half an egg)""" self.assertAlmostEquals(EGG.grams2wholeunits(53 / 2.0), 0.5, 2)
def test_weight2whole_units_1egg(self): """Test conversion of grams to whole units (1 egg)""" self.assertAlmostEquals(EGG.grams2wholeunits(53), 1, 2)