[Zope3-checkins] CVS: Zope3/src/zdaemon/tests - testDaemon.py:1.9
Marius Gedminas
mgedmin@codeworks.lt
Mon, 23 Jun 2003 13:50:22 -0400
Update of /cvs-repository/Zope3/src/zdaemon/tests
In directory cvs.zope.org:/tmp/cvs-serv19313
Modified Files:
testDaemon.py
Log Message:
Shut up error messages from testDaemon.py
=== Zope3/src/zdaemon/tests/testDaemon.py 1.8 => 1.9 ===
--- Zope3/src/zdaemon/tests/testDaemon.py:1.8 Thu Jun 19 17:41:11 2003
+++ Zope3/src/zdaemon/tests/testDaemon.py Mon Jun 23 13:50:22 2003
@@ -39,6 +39,8 @@
def setUp(self):
self.handler = TestErrorHandler()
+ self.old_handlers = logging.root.handlers
+ logging.root.handlers = []
logging.root.addHandler(self.handler)
self.level = logging.root.level # is there a better way?
logging.root.setLevel(logging.ERROR)
@@ -48,6 +50,7 @@
def tearDown(self):
logging.root.removeHandler(self.handler)
+ logging.root.handlers = self.old_handlers
logging.root.setLevel(self.level)
def run(self, arg):