[Checkins] SVN: ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py Avoid ResourceWarning in tests.

Marius Gedminas cvs-admin at zope.org
Thu Feb 14 11:03:54 UTC 2013


Log message for revision 129386:
  Avoid ResourceWarning in tests.
  
  

Changed:
  U   ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py

-=-
Modified: ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py
===================================================================
--- ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py	2013-02-14 11:00:10 UTC (rev 129385)
+++ ZConfig/trunk/ZConfig/components/logger/tests/test_logger.py	2013-02-14 11:03:54 UTC (rev 129386)
@@ -311,6 +311,7 @@
         syslog = logger.handlers[0]
         self.assertEqual(syslog.level, logging.ERROR)
         self.assertTrue(isinstance(syslog, loghandler.SysLogHandler))
+        syslog.close() # avoid ResourceWarning
 
     def test_with_http_logger_localhost(self):
         logger = self.check_simple_logger("<eventlog>\n"



More information about the checkins mailing list