PATCH: Quote exception formats
Mark Mitchell
mark at codesourcery.com
Fri Jun 10 20:57:17 UTC 2005
When an uncaught exception occurs while running a test, QMTest records
the exeption in the qmtest.exception result annotation. This
annotation should be stored as preformatted text; otherwise, it gets
mangled when being displayed by the results formatters.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
2005-06-10 Mark Mitchell <mark at codesourcery.com>
* qm/test/result.py (Result.NoteException): Quote exception
string.
Index: qm/test/result.py
===================================================================
RCS file: /home/qm/Repository/qm/qm/test/result.py,v
retrieving revision 1.26
diff -c -5 -p -r1.26 result.py
*** qm/test/result.py 31 Mar 2004 10:32:44 -0000 1.26
--- qm/test/result.py 10 Jun 2005 20:47:55 -0000
*************** class Result:
*** 312,322 ****
if exception_type is ContextException:
self["qmtest.context_variable"] = exc_info[1].key
self.SetOutcome(outcome)
self[Result.CAUSE] = cause
! self[Result.EXCEPTION] = "%s: %s" % exc_info[:2]
self[Result.TRACEBACK] \
= self.Quote(qm.format_traceback(exc_info))
def MakeDomNode(self, document):
--- 312,323 ----
if exception_type is ContextException:
self["qmtest.context_variable"] = exc_info[1].key
self.SetOutcome(outcome)
self[Result.CAUSE] = cause
! self[Result.EXCEPTION] \
! = self.Quote("%s: %s" % exc_info[:2])
self[Result.TRACEBACK] \
= self.Quote(qm.format_traceback(exc_info))
def MakeDomNode(self, document):
More information about the qmtest
mailing list