def test_errors(self):
        
        self.top.vehicle.ratio1 = 3.54
        self.top.vehicle.ratio2 = 3.54
        self.top.vehicle.ratio3 = 3.54
        self.top.vehicle.ratio4 = 3.54
        self.top.vehicle.ratio5 = 3.54
        try:
            self.top.run() #sim_EPA_city.run()
        except __HOLE__, err:
            msg = "sim_EPA_city: Transmission gearing cannot " \
                  "achieve acceleration and speed required by EPA " \
                  "test."
            
            self.assertEqual(str(err), msg)
        else:
            self.fail('RuntimeError expected.')
        
        self.top.sim_acc.end_speed = 12.0
        self.top.vehicle.ratio1 = 18.0
        self.top.vehicle.ratio2 = 18.0
        self.top.vehicle.ratio3 = 18.0
        self.top.vehicle.ratio4 = 18.0
        self.top.vehicle.ratio5 = 18.0
        
        try:
            self.top.sim_acc.run()
        except RuntimeError, err:
            msg = "sim_acc: Gearing problem in Accel test."
            self.assertEqual(str(err), msg)
        else:
            self.fail('RuntimeError expected.')
        
        self.top.vehicle.ratio1 = 1.0
        self.top.vehicle.ratio2 = 1.0
        self.top.vehicle.ratio3 = 1.0
        self.top.vehicle.ratio4 = 1.0
        self.top.vehicle.ratio5 = 1.0
        
        try:
            self.top.sim_EPA_city.run()
        except RuntimeError, err:
            msg = "sim_EPA_city: Vehicle is unable to achieve " \
                  "acceleration required to match EPA driving profile."
            self.assertEqual(str(err), msg)
        else:
            self.fail('RuntimeError expected.')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/contrib/enginedesign/openmdao.examples.enginedesign/openmdao/examples/enginedesign/test/test_driving_sim.py/VehicleTestCase.test_errors