Пример #1
0
    def testExceptionUnicode1(self):
        """
        create an exception with non-ascii chars in message and test WMException constructor
        """

        exception = WMException(
            "an exception message with nr. 100 and some non-ascii characters: ₩♏ℭ☺яε",
            100, **self.test_data)
        self.logger.debug("XML version of exception: %s", exception.xml())
        self.logger.debug("String version of exception: %s", str(exception))
        self.logger.debug("exception.__str__(): %s", type(exception.__str__(
        )))  # from py2 interpreter: <class 'future.types.newbytes.newbytes'>
        self.logger.debug("str(exception): %s", type(
            str(exception)))  # <class 'future.types.newstr.newstr'>