summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cgi.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-22 03:14:12 (GMT)
committerBrett Cannon <bcannon@gmail.com>2011-02-22 03:14:12 (GMT)
commiteeb114b028f7aef886e0b1b514d58aac9d26bc8c (patch)
tree20cd4624eae82cb746a767894f950f14eb73afe1 /Lib/test/test_cgi.py
parent7a54073a566080f3d7c10871f6ce244c9fc1221b (diff)
downloadcpython-eeb114b028f7aef886e0b1b514d58aac9d26bc8c.zip
cpython-eeb114b028f7aef886e0b1b514d58aac9d26bc8c.tar.gz
cpython-eeb114b028f7aef886e0b1b514d58aac9d26bc8c.tar.bz2
Issue #10512: close the log file in cgi when running tests.
Thanks to Nadeem Vawda for the find and an initial fix.
Diffstat (limited to 'Lib/test/test_cgi.py')
-rw-r--r--Lib/test/test_cgi.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
index 3b6f59b..985de11 100644
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -155,6 +155,7 @@ class CgiTests(unittest.TestCase):
cgi.logfp = None
cgi.logfile = "/dev/null"
cgi.initlog("%s", "Testing log 3")
+ self.addCleanup(cgi.logfp.close)
cgi.log("Testing log 4")
def test_fieldstorage_readline(self):