def test_exitMessageZero(self):
        """
        L{exit} given a status code of zero (C{0}) writes the given message to
        standard output.
        """
        out = NativeStringIO()
        self.patch(_exit, "stdout", out)

        message = "Hello, world."
        exit(0, message)

        self.assertEqual(out.getvalue(), message + "\n")

        L{exit} given a status code of zero (C{0}) writes the given message to
        standard output.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/application/runner/test/test_exit.py