'L{task.react} forwards the exit code specified by the C{SystemExit}
error returned by the passed function, if any.'

def test_exitWithDefinedCode(self):

    def main(reactor):
        return defer.fail(SystemExit(23))
    r = _FakeReactor()
    exitError = self.assertRaises(SystemExit, task.react, main, [], _reactor=r)
    self.assertEqual(23, exitError.code)
