def test_initial_run(self):
        # Test to make sure fix that put run_iteration
        #   at the top of the execute method is in place and working
        class MyComp(Component):

            x = Float(0.0, iotype='in', low=-10, high=10)
            xx = Float(0.0, iotype='in', low=-10, high=10)
            f_x = Float(iotype='out')
            y = Float(iotype='out')

            def execute(self):
                if self.xx != 1.0:
                    self.raise_exception("Lazy", RuntimeError)
                self.f_x = 2.0*self.x
                self.y = self.x

        @add_delegate(HasParameters)
        class SpecialDriver(Driver):

            implements(IHasParameters)

            def execute(self):
                self.set_parameters([1.0])

        top = set_as_top(Assembly())
        top.add('comp', MyComp())

        try:
            from pyopt_driver.pyopt_driver import pyOptDriver
        except ImportError:
            raise SkipTest("this test requires pyOpt to be installed")

        try:
            top.driver.optimizer = 'CONMIN'
        except __HOLE__:
            raise SkipTest("CONMIN not present on this system")

        top.driver.title = 'Little Test'
        optdict = {}
        top.driver.options = optdict
        top.driver.pyopt_diff = True

        top.add('driver', pyOptDriver())
        top.add('subdriver', SpecialDriver())
        top.driver.workflow.add('subdriver')
        top.subdriver.workflow.add('comp')

        top.subdriver.add_parameter('comp.xx')
        top.driver.add_parameter('comp.x')
        top.driver.add_constraint('comp.y > 1.0')
        top.driver.add_objective('comp.f_x')

        top.run()
dataset/ETHPy150Open OpenMDAO-Plugins/pyopt_driver/src/pyopt_driver/test/test_pyopt_driver.py/pyOptDriverTestCase.test_initial_run