def test_strWithLog(self):
        """
        If a line log is supplied to L{SMTPClientError}, its contents are
        included in the string representation of the exception instance.
        """
        log = LineLog(10)
        log.append(b"testlog")
        log.append(b"secondline")
        err = smtp.SMTPClientError(100, "test error", log=log.str())
        self.assertEqual(
            str(err),
            "100 test error\n"
            "testlog\n"
            "secondline\n")

        If a line log is supplied to L{SMTPClientError}, its contents are
        included in the string representation of the exception instance.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_smtp.py