Commit ef6bdbc8 authored by Richard Jones's avatar Richard Jones

fixes to Testing so we can use the log redirection function

parent eeb96fa3
# Default test runner # Default test runner
import unittest
TestRunner = unittest.TextTestRunner TestRunner = unittest.TextTestRunner
def framework(): def framework():
...@@ -49,6 +50,11 @@ def catch_log_errors(): ...@@ -49,6 +50,11 @@ def catch_log_errors():
def log_write(subsystem, severity, summary, detail, error, def log_write(subsystem, severity, summary, detail, error,
PROBLEM=zLOG.PROBLEM): 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: if severity > PROBLEM:
assert 0, "%s(%s): %s" % (subsystem, severity, summary) assert 0, "%s(%s): %s" % (subsystem, severity, summary)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment