def test_nonASCIIErrorInParent(self):
        """
        When the child writes a non-ASCII error message to the status
        pipe during daemonization, the parent writes the repr of the
        message to C{stderr} and exits with a non-zero status code.
        """
        self.assertErrorInParentBehavior(
            readData=b"1 Exception: \xff",
            errorMessage=(
                "An error has occurred: b'Exception: \\xff'\n"
                "Please look at log file for more information.\n"
            ),
            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, the parent writes the repr of the
        message to C{stderr} and exits with a non-zero status code.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py