def test_range_violations(self):
        try:
            self.hobj.float1 = 124
        except __HOLE__, err:
            self.assertEqual(str(err), 
                ": Variable 'float1' must be a float in the range [0.0, 99.0], but a value of 124 <type 'int'> was specified.")
        else:
            self.fail('ValueError expected')
        try:
            self.hobj.float1 = -3
        except ValueError, err:
            self.assertEqual(str(err),
                ": Variable 'float1' must be a float in the range [0.0, 99.0], but a value of -3 <type 'int'> was specified.")
        else:
            self.fail('ValueError exception')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/datatypes/test/test_float.py/FloatTestCase.test_range_violations