Ejemplo n.º 1
0
 def test_calculate_weight_ranges_with_info(self):
     self.assertEqual(Bmi.calculate_weight_ranges_with_info(1.80), [
         {
             'From': 0,
             'To': 59.9,
             'Info': 'Underweight'
         },
         {
             'From': 59.9,
             'To': 81,
             'Info': 'Healthy'
         },
         {
             'From': 81,
             'To': 97.2,
             'Info': 'Overweight'
         },
         {
             'From': 97.2,
             'To': 113.4,
             'Info': 'Obese, Class I'
         },
         {
             'From': 113.4,
             'To': 129.6,
             'Info': 'Obese, Class II'
         },
         {
             'From': 129.6,
             'To': "",
             'Info': 'Obese, Class III'
         },
     ])
Ejemplo n.º 2
0
 def test_calculate_weight_ranges_with_info_lang(self):
     self.assertEqual(Bmi.calculate_weight_ranges_with_info(1.80, "es"), [
         {
             'From': 0,
             'To': 59.9,
             'Info': 'Bajo peso'
         },
         {
             'From': 59.9,
             'To': 81,
             'Info': 'Peso saludable'
         },
         {
             'From': 81,
             'To': 97.2,
             'Info': 'Sobrepeso'
         },
         {
             'From': 97.2,
             'To': 113.4,
             'Info': 'Obesidad, Clase I'
         },
         {
             'From': 113.4,
             'To': 129.6,
             'Info': 'Obesidad, Clase II'
         },
         {
             'From': 129.6,
             'To': "",
             'Info': 'Obesidad, Clase III'
         },
     ])
Ejemplo n.º 3
0
def execute_calculate_weight_ranges_info(args):
    return Bmi.calculate_weight_ranges_with_info(args.height[0], args.lang)