Esempio n. 1
0
 def test_calculate_bmi_equal_80_180(self):
     self.assertEqual(Bmi.calculate_bmi(80, 1.80), 24.7,
                      "Body Mass Index for 80kg and 1.80m is 24.7")
Esempio n. 2
0
 def test_calculate_bmi_thin_59_176(self):
     self.assertEqual(Bmi.calculate_bmi(59, 1.76), 19,
                      "Body Mass Index for 59kg and 1.76m is 19")
Esempio n. 3
0
 def test_calculate_bmi_equal_64_164(self):
     self.assertEqual(Bmi.calculate_bmi(64, 1.64), 23.8,
                      "Body Mass Index for 64kg and 1.64m is 23.8")
Esempio n. 4
0
 def test_calculate_bmi_obese_93_171(self):
     self.assertEqual(Bmi.calculate_bmi(93, 1.71), 31.8,
                      "Body Mass Index for 93kg and 1.71m is 31.8")
Esempio n. 5
0
def execute_calculate_bmi(args):
    if args.info:
        return Bmi.calculate_bmi_with_info(args.weight[0], args.height[0],
                                           args.info)
    else:
        return Bmi.calculate_bmi(args.weight[0], args.height[0])