def test_stringMessageWithLocalFailure(self):
        """
        L{amp.RemoteAmpError} renders local errors with a "(local)" marker and
        a brief traceback.
        """
        failure = Failure(Exception("Something came loose"))
        error = amp.RemoteAmpError(
            b"BROKEN", "Something has broken", local=failure)
        self.assertRegex(
            str(error), (
                "^Code<BROKEN> [(]local[)]: Something has broken\n"
                "Traceback [(]failure with no frames[)]: "
                "<.+Exception.>: Something came loose\n"
            ))

        L{amp.RemoteAmpError} renders local errors with a "(local)" marker and
        a brief traceback.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py