mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Try to fix test_wsgiref failures due to test_httpservers modifying the environment
This commit is contained in:
parent
f226ac8a72
commit
7f4f8c3ff1
1 changed files with 5 additions and 1 deletions
|
@ -341,13 +341,17 @@ class CGIHTTPServerTestCase(BaseTestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_main(verbose=None):
|
def test_main(verbose=None):
|
||||||
|
cwd = os.getcwd()
|
||||||
|
env = os.environ.copy()
|
||||||
try:
|
try:
|
||||||
cwd = os.getcwd()
|
|
||||||
test_support.run_unittest(BaseHTTPServerTestCase,
|
test_support.run_unittest(BaseHTTPServerTestCase,
|
||||||
SimpleHTTPServerTestCase,
|
SimpleHTTPServerTestCase,
|
||||||
CGIHTTPServerTestCase
|
CGIHTTPServerTestCase
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
|
test_support.reap_children()
|
||||||
|
os.environ.clear()
|
||||||
|
os.environ.update(env)
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue