Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_httpservers.py @ 57084:3201fab35220 2.6
Try to fix test_wsgiref failures due to test_httpservers modifying the environment
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Mon, 02 Nov 2009 22:04:54 +0000 |
| parents | 77557216ba32 |
| children | f84f83963a78 |
line wrap: on
line diff
--- a/Lib/test/test_httpservers.py Mon Nov 02 21:03:53 2009 +0000 +++ b/Lib/test/test_httpservers.py Mon Nov 02 22:04:54 2009 +0000 @@ -341,13 +341,17 @@ 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__':
