[Zodb-checkins] CVS: ZODB4/src/zdaemon/tests - testDaemon.py:1.8
Jeremy Hylton
jeremy at zope.com
Thu Jun 19 18:41:42 EDT 2003
Update of /cvs-repository/ZODB4/src/zdaemon/tests
In directory cvs.zope.org:/tmp/cvs-serv15960/src/zdaemon/tests
Modified Files:
testDaemon.py
Log Message:
Merge ZODB3-2-merge branch to the head.
This completes the porting of bug fixes and random improvements from
ZODB 3.2 to ZODB 4.
=== ZODB4/src/zdaemon/tests/testDaemon.py 1.7 => 1.8 ===
--- ZODB4/src/zdaemon/tests/testDaemon.py:1.7 Thu Jun 19 12:44:36 2003
+++ ZODB4/src/zdaemon/tests/testDaemon.py Thu Jun 19 17:41:11 2003
@@ -32,20 +32,23 @@
if record.levelno >= logging.ERROR:
raise TestDoneError(self.format(record))
-logging.root.addHandler(TestErrorHandler())
-
class DaemonTest(unittest.TestCase):
dir, file = os.path.split(zdaemon.tests.__file__)
script = os.path.join(dir, "testDaemon.py")
def setUp(self):
+ self.handler = TestErrorHandler()
+ logging.root.addHandler(self.handler)
+ self.level = logging.root.level # is there a better way?
+ logging.root.setLevel(logging.ERROR)
os.environ["Z_DEBUG_MODE"] = ""
if os.environ.has_key("ZDAEMON_MANAGED"):
del os.environ["ZDAEMON_MANAGED"]
def tearDown(self):
- pass
+ logging.root.removeHandler(self.handler)
+ logging.root.setLevel(self.level)
def run(self, arg):
try:
More information about the Zodb-checkins
mailing list