

def test_run_returns_integer_exit_code(self):
    exception = OSError(4, '')
    application = Application()
    application.set_auto_exit(False)
    application.do_run = self.mock().MagicMock(side_effect=exception)
    exit_code = application.run(ListInput([]), NullOutput())
    self.assertEqual(4, exit_code)

dataset/ETHPy150Open sdispater/cleo/tests/test_application.py ApplicationTest.test_run_returns_integer_exit_code/original