def testExceptionUnicode0(self): """ create an exception with non-ascii chars in message and test WMException.addInfo(). """ exception = WMException( "an exception message with nr. 100 and some non-ascii characters: ₩♏ℭ☺яε", 100) exception.addInfo(**self.test_data) self.logger.debug("XML version of exception: %s", exception.xml()) self.logger.debug("String version of exception: %s", str(exception))
def testException(self): """ create an exception and do some tests. """ exception = WMException("an exception message with nr. 100", 100) self.logger.debug("String version of exception: " + str(exception)) self.logger.debug("XML version of exception: " + exception.xml()) self.logger.debug("Adding data") data = {} data['key1'] = 'value1' data['key2'] = 'data2' exception.addInfo(**data) self.logger.debug("String version of exception: "+ str(exception))
def testException(self): """ create an exception and do some tests. """ exception = WMException("an exception message with nr. 100", 100) self.logger.debug("String version of exception: " + str(exception)) self.logger.debug("XML version of exception: " + exception.xml()) self.logger.debug("Adding data") data = {} data['key1'] = 'value1' data['key2'] = 'data2' exception.addInfo(**data) self.logger.debug("String version of exception: " + str(exception))
def testException(self): """ create an exception and do some tests (only ascii chars) """ exception = WMException("an exception message with nr. 100", 100) self.logger.debug("String version of exception: %s", str(exception)) self.logger.debug("XML version of exception: %s", exception.xml()) self.logger.debug("Adding data") data = {} data['key1'] = 'value1' data['key2'] = 3.14159 exception.addInfo(**data) self.logger.debug("String version of exception: %s", str(exception))
def testExceptionUnicode(self): """ create an exception with non-ascii characters and do some tests. """ exception = WMException( "an exception message with nr. 100 and some non-ascii characters: ₩♏ℭ☺яε", 100) self.logger.debug("String version of exception: " + str(exception)) self.logger.debug("XML version of exception: " + exception.xml()) self.logger.debug("Adding data") data = {} data['key1'] = 'value1' data['key2'] = 'data2' exception.addInfo(**data) self.logger.debug("String version of exception: " + str(exception))