summaryrefslogtreecommitdiff
path: root/Lib/test/test_httpservers.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-11-02 22:04:54 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2009-11-02 22:04:54 +0000
commit7f4f8c3ff148e151e345253c8a607a1d5fe14d4d (patch)
treef1b2faf6a361dc1dc239bdb19c359401349f0b7f /Lib/test/test_httpservers.py
parentf226ac8a723ffc72f77209418f927b685bd7e281 (diff)
downloadcpython-git-7f4f8c3ff148e151e345253c8a607a1d5fe14d4d.tar.gz
Try to fix test_wsgiref failures due to test_httpservers modifying the environment
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r--Lib/test/test_httpservers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 31321c3fa6..49474f6351 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -341,13 +341,17 @@ class CGIHTTPServerTestCase(BaseTestCase):
def test_main(verbose=None):
+ cwd = os.getcwd()
+ env = os.environ.copy()
try:
- cwd = os.getcwd()
test_support.run_unittest(BaseHTTPServerTestCase,
SimpleHTTPServerTestCase,
CGIHTTPServerTestCase
)
finally:
+ test_support.reap_children()
+ os.environ.clear()
+ os.environ.update(env)
os.chdir(cwd)
if __name__ == '__main__':