[Python-checkins] r77160 - in python/trunk/Lib/lib2to3: tests/test_main.py

benjamin.peterson python-checkins at python.org
Wed Dec 30 20:44:23 CET 2009


Author: benjamin.peterson
Date: Wed Dec 30 20:44:23 2009
New Revision: 77160

Log:
Merged revisions 77158 via svnmerge from 
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r77158 | benjamin.peterson | 2009-12-30 13:41:03 -0600 (Wed, 30 Dec 2009) | 1 line
  
  clean up logging's global state after the test finishes
........


Modified:
   python/trunk/Lib/lib2to3/   (props changed)
   python/trunk/Lib/lib2to3/tests/test_main.py

Modified: python/trunk/Lib/lib2to3/tests/test_main.py
==============================================================================
--- python/trunk/Lib/lib2to3/tests/test_main.py	(original)
+++ python/trunk/Lib/lib2to3/tests/test_main.py	Wed Dec 30 20:44:23 2009
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 import sys
 import codecs
+import logging
 import StringIO
 import unittest
 
@@ -9,6 +10,10 @@
 
 class TestMain(unittest.TestCase):
 
+    def tearDown(self):
+        # Clean up logging configuration down by main.
+        del logging.root.handlers[:]
+
     def run_2to3_capture(self, args, in_capture, out_capture, err_capture):
         save_stdin = sys.stdin
         save_stdout = sys.stdout


More information about the Python-checkins mailing list