def test_uninitialized_array(self):
        expected = ": out1.x was not initialized. OpenMDAO does not support uninitialized variables."

        """
        out1.x is:
            - uninitialized
            - flattenable
            - the source of a connection
            - not a slice
        """

        top = set_as_top(Assembly())
        top.add('out1', self.C1())
        top.add('in1', self.C2())
        top.connect('out1.x', 'in1.x')
        top.driver.workflow.add(['out1', 'in1'])

        try:
            top.run()
        except __HOLE__ as e:
            self.assertEqual(str(e), expected)
        else:
            self.fail("Should have raised error message: {}".format(expected))

        """
        out1.x is:
            - uninitialized
            - not flattenable
            - the source of a connection
            - not a slice
        """

        top = set_as_top(Assembly())
        top.add('out1', self.C3())
        top.add('in1', self.C2())
        top.connect('out1.x', 'in1.x')
        top.driver.workflow.add(['out1', 'in1'])

        top.run()

        """
        out1.x is:
            - initialized
            - flattenable
            - the source of a connection
            - not a slice
        """

        top = set_as_top(Assembly())
        top.add('out1', self.C4(np.eye(2)))
        top.add('in1', self.C2())
        top.connect('out1.x', 'in1.x')
        top.driver.workflow.add(['out1', 'in1'])

        top.run()

        """
        out1.x is:
            - initialized
            - flattenable
            - the source of a connection
            - not a slice

        in1.x[::1] is:
            - initialized
            - flattenable
            - the source of a connection
            - a slice
        """

        top = set_as_top(Assembly())
        top.add('out1', self.C4(np.array(range(5))))
        top.add('in1', self.C2())
        top.add('in2', self.C2())
        top.connect('out1.x', 'in1.x')
        top.connect('in1.x[::1]', 'in2.x')
        top.driver.workflow.add(['out1', 'in1', 'in2'])

        top.run()

        """
        sub.out1.x is:
            - not initialized
            - flattenable
            - source of a connection
            - not a slice
        """
        expected = "sub: out1.x was not initialized. OpenMDAO does not support uninitialized variables."

        top = set_as_top(Assembly())
        top.add('sub', Assembly())
        top.sub.add('out1', self.C1())
        top.sub.add('in1', self.C2())

        top.sub.connect('out1.x', 'in1.x')
        top.sub.driver.workflow.add(['out1', 'in1'])
        top.driver.workflow.add(['sub'])


        try:
            top.run()
        except ValueError as e:
            self.assertEqual(str(e), expected)
        else:
            self.fail("Should have raised error message: {}".format(expected))
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/test/test_system.py/UninitializedArray.test_uninitialized_array