def test_errorInParentWithTruncatedUnicode(self):
        """
        When the child writes a non-ASCII error message to the status
        pipe during daemonization, and that message is too longer, the
        parent writes the repr of the truncated message to C{stderr}
        and exits with a non-zero status code.
        """
        truncatedMessage = b'1 RuntimeError: ' + b'\\u2022' * 14
        # the escape sequence will appear to be escaped twice, because
        # we're getting the repr
        reportedMessage = "b'RuntimeError: {}'".format(r'\\u2022' * 14)
        self.assertErrorInParentBehavior(
            readData=truncatedMessage,
            errorMessage=(
                "An error has occurred: {}\n"
                "Please look at log file for more information.\n".format(
                    reportedMessage)
            ),
            mockOSActions=[
                ('chdir', '.'), ('umask', 0o077), ('fork', True),
                ('read', -1, 100), ('exit', 1), ('unlink', 'twistd.pid'),
            ],
        )

        When the child writes a non-ASCII error message to the status
        pipe during daemonization, and that message is too longer, the
        parent writes the repr of the truncated message to C{stderr}
        and exits with a non-zero status code.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py