Exemple #1
0
 def test_getBmiCategory_obese(self):
     result = getBmiCategory(30)
     self.assertEqual(result, 'obese')
Exemple #2
0
 def test_getBmiCategory_superHigh(self):
     result = getBmiCategory(3141592657)
     self.assertEqual(result, 'obese')
Exemple #3
0
 def test_getBmiCategory_overweight(self):
     result = getBmiCategory(25)
     self.assertEqual(result, 'overweight')
Exemple #4
0
 def test_getBmiCategory_overweightHigh(self):
     result = getBmiCategory(29.141592657)
     self.assertEqual(result, 'overweight')
Exemple #5
0
 def test_getBmiCategory_normalHigh(self):
     result = getBmiCategory(24.9999)
     self.assertEqual(result, 'normal')
Exemple #6
0
 def test_getBmiCategory_normal(self):
     result = getBmiCategory(18.5)
     self.assertEqual(result, 'normal')
Exemple #7
0
 def test_getBmiCategory_underweight(self):
     result = getBmiCategory(18.4)
     self.assertEqual(result, 'underweight')
Exemple #8
0
 def test_getBmiCategory_zero(self):
     result = getBmiCategory(0)
     self.assertEqual(result, 'underweight')
Exemple #9
0
 def test_getBmiCategory_negative(self):
     with self.assertRaises(ValueError):
         getBmiCategory(-1)