def test_error(self):
        """
        If an error happens during daemonization, the child process writes the
        exception error to the status pipe.
        """
        self.assertErrorWritten(raised="Something is wrong",
                                reported=b'1 RuntimeError: Something is wrong')

        If an error happens during daemonization, the child process writes the
        exception error to the status pipe.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py