def test_improper_parameter_type(self):

        class SomeComp(Component):
            """Arbitrary component with a few variables, but which does not
            really do any calculations"""

            z = Str("test", iotype="in")

        class Simulation(Assembly):
            """Top Level Assembly used for simulation"""

            def configure(self):
                """Adds the Genetic driver to the assembly"""

                self.add('driver', Genetic())
                self.add('comp', SomeComp())
                self.driver.workflow.add('comp')

                self.driver.add_parameter('comp.z')

        try:
            s = set_as_top(Simulation())
        except __HOLE__ as err:
            self.assertEqual(str(err),
                "driver: The value of parameter 'comp.z' must be a real or "
                "integral type, but its type is 'str'.")
        else:
            self.fail("ValueError expected")
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/drivers/test/test_opt_genetic.py/TestCase.test_improper_parameter_type