def test_badcmd(self):
        logging.debug('')
        logging.debug('test_badcmd')

        # Set command to nonexistant path.
        extcode = set_as_top(ExternalCode())
        extcode.command = ['no-such-command']

        try:
            extcode.run()
        except __HOLE__ as exc:
            msg = ": The command to be executed, 'no-such-command', cannot be found"
            self.assertEqual(str(exc), msg)
            self.assertEqual(extcode.return_code, -999999)
        else:
            self.fail('Expected OSError')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/components/test/test_extcode.py/TestCase.test_badcmd