def test_variable_access_before_setup(self):
        prob = Problem(root=ExampleGroup())

        try:
            prob['G2.C1.x'] = 5.
        except AttributeError as err:
            msg = "'unknowns' has not been initialized, setup() must be called before 'G2.C1.x' can be accessed"
            self.assertEqual(text_type(err), msg)
        else:
            self.fail('Exception expected')

        try:
            prob.run()
        except __HOLE__ as err:
            msg = "setup() must be called before running the model."
            self.assertEqual(text_type(err), msg)
        else:
            self.fail('Exception expected')
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/core/test/test_problem.py/TestProblem.test_variable_access_before_setup