def test_error_code_raise(self):

        self.extcode.options['command'] = ['python', 'external_code_for_testing.py',
             'external_code_output.txt', '--delay', '-3']
        self.extcode.options['timeout'] = 1.0

        self.extcode.options['external_input_files'] = ['external_code_for_testing.py', ]

        dev_null = open(os.devnull, 'w')
        self.top.setup(check=True, out_stream=dev_null)
        try:
            self.top.run()
        except __HOLE__ as exc:
            self.assertTrue('Traceback' in str(exc))
            self.assertEqual(self.extcode.return_code, 1)
        else:
            self.fail('Expected RuntimeError')
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/components/test/test_external_code.py/TestExternalCode.test_error_code_raise