[Zodb-checkins] CVS: ZODB3/zLOG/tests - testzLogConfig.py:1.11

Tim Peters tim.one at comcast.net
Thu Oct 2 20:29:26 EDT 2003


Update of /cvs-repository/ZODB3/zLOG/tests
In directory cvs.zope.org:/tmp/cvs-serv14157/zLOG/tests

Modified Files:
	testzLogConfig.py 
Log Message:
test_with_logfile():  This was leaving a temp file behind.


=== ZODB3/zLOG/tests/testzLogConfig.py 1.10 => 1.11 ===
--- ZODB3/zLOG/tests/testzLogConfig.py:1.10	Thu Jan 23 16:18:05 2003
+++ ZODB3/zLOG/tests/testzLogConfig.py	Thu Oct  2 20:29:25 2003
@@ -107,6 +107,7 @@
                                 zLOG.LogHandlers.NullHandler))
 
     def test_with_logfile(self):
+        import os
         fn = tempfile.mktemp()
         logger = self.check_simple_logger("<eventlog>\n"
                                           "  <logfile>\n"
@@ -117,6 +118,8 @@
         logfile = logger.handlers[0]
         self.assertEqual(logfile.level, logging.DEBUG)
         self.assert_(isinstance(logfile, zLOG.LogHandlers.FileHandler))
+        logfile.close()
+        os.remove(fn)
 
     def test_with_stderr(self):
         self.check_standard_stream("stderr")




More information about the Zodb-checkins mailing list