[Zope-Checkins] CVS: Zope/lib/python/Testing - common.py:1.5

Richard Jones richard@commonground.com.au
Thu, 5 Jun 2003 21:25:46 -0400


Update of /cvs-repository/Zope/lib/python/Testing
In directory cvs.zope.org:/tmp/cvs-serv21606

Modified Files:
	common.py 
Log Message:
fixes to Testing so we can use the log redirection function

=== Zope/lib/python/Testing/common.py 1.4 => 1.5 ===
--- Zope/lib/python/Testing/common.py:1.4	Wed Aug 14 18:01:39 2002
+++ Zope/lib/python/Testing/common.py	Thu Jun  5 21:25:45 2003
@@ -1,4 +1,5 @@
 # Default test runner
+import unittest
 TestRunner = unittest.TextTestRunner
 
 def framework():
@@ -49,6 +50,11 @@
 
     def log_write(subsystem, severity, summary, detail, error,
                   PROBLEM=zLOG.PROBLEM):
+        # we are logging an exception - lets assume that the last exception
+        # raised was the one we're interested in, so re-raise it rather
+        # than the less-than-useful assert below
+        if error is not None:
+            raise
         if severity > PROBLEM:
             assert 0, "%s(%s): %s" % (subsystem, severity, summary)