Exemple #1
0
 def test410_920_ShouldHandleNonNumericStringValue(self):
     input = {'height': '-1.0'}
     with self.assertRaises(ValueError):
         adjust.extractHeight(input)
     self.assertEqual(input['error'], 'height is invalid')
Exemple #2
0
 def test410_040_ShouldHandleHighValue(self):
     actual = adjust.extractHeight({'height': '999999.9'})
     self.assertAlmostEquals(actual, 999999.9, 5)
Exemple #3
0
 def test410_020_ShouldHandleLowValue(self):
     actual = adjust.extractHeight({'height': '0'})
     self.assertAlmostEquals(actual, 0.0, 5)
Exemple #4
0
 def test410_030_ShouldHandleNominalValue(self):
     actual = adjust.extractHeight({'height': '25.2'})
     self.assertAlmostEquals(actual, 25.2, 5)
Exemple #5
0
 def test410_010_ShouldGetDefaultValue(self):
     actual = adjust.extractHeight({})
     self.assertAlmostEquals(actual, 0.0, 5)