diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-02 22:04:54 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-02 22:04:54 +0000 |
commit | 7f4f8c3ff148e151e345253c8a607a1d5fe14d4d (patch) | |
tree | f1b2faf6a361dc1dc239bdb19c359401349f0b7f /Lib/test/test_httpservers.py | |
parent | f226ac8a723ffc72f77209418f927b685bd7e281 (diff) | |
download | cpython-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.py | 6 |
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__': |