[Python-checkins] cpython (merge 3.2 -> default): Merge with 3.2.

ezio.melotti python-checkins at python.org
Thu Jul 14 14:57:25 CEST 2011


http://hg.python.org/cpython/rev/ac1c3291a689
changeset:   71325:ac1c3291a689
parent:      71321:f45823977d4b
parent:      71324:530ba6c7e578
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Thu Jul 14 15:57:12 2011 +0300
summary:
  Merge with 3.2.

files:
  Lib/test/test_cgi.py |  8 +++++++-
  1 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -155,7 +155,13 @@
             cgi.logfp = None
             cgi.logfile = "/dev/null"
             cgi.initlog("%s", "Testing log 3")
-            self.addCleanup(cgi.logfp.close)
+            def log_cleanup():
+                """Restore the global state of the log vars."""
+                cgi.logfile = ''
+                cgi.logfp.close()
+                cgi.logfp = None
+                cgi.log = cgi.initlog
+            self.addCleanup(log_cleanup)
             cgi.log("Testing log 4")
 
     def test_fieldstorage_readline(self):

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


More information about the Python-checkins mailing list