[Python-checkins] cpython: Attempt fix of #11557 by refining setup/teardown logic.

vinay.sajip python-checkins at python.org
Wed Apr 20 13:21:00 CEST 2011


http://hg.python.org/cpython/rev/0494afdc8615
changeset:   69468:0494afdc8615
user:        Vinay Sajip <vinay_sajip at yahoo.co.uk>
date:        Wed Apr 20 12:20:44 2011 +0100
summary:
  Attempt fix of #11557 by refining setup/teardown logic.

files:
  Lib/test/test_logging.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -2417,6 +2417,7 @@
         self.handlers = logging.root.handlers
         self.saved_handlers = logging._handlers.copy()
         self.saved_handler_list = logging._handlerList[:]
+        self.original_logging_level = logging.root.level
         self.addCleanup(self.cleanup)
         logging.root.handlers = []
 
@@ -2431,6 +2432,7 @@
         logging._handlers.clear()
         logging._handlers.update(self.saved_handlers)
         logging._handlerList[:] = self.saved_handler_list
+        logging.root.level = self.original_logging_level
 
     #@unittest.skipIf(True, "test disabled, issue #11557")
     def test_no_kwargs(self):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list