diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-03 17:20:10 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-03 17:20:10 (GMT) |
commit | 8f5731ba034e2f6540d8d3b811653c02caa224b0 (patch) | |
tree | fabd9d1cd04e045dee317012f9176266b365d2d1 /Lib/test/test_wsgiref.py | |
parent | 305c6b8fee224eed8095c87e386fc8ce2f4b6d36 (diff) | |
download | cpython-8f5731ba034e2f6540d8d3b811653c02caa224b0.zip cpython-8f5731ba034e2f6540d8d3b811653c02caa224b0.tar.gz cpython-8f5731ba034e2f6540d8d3b811653c02caa224b0.tar.bz2 |
Merged revisions 76086 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76086 | antoine.pitrou | 2009-11-03 17:41:20 +0100 (mar., 03 nov. 2009) | 3 lines
Try to make test_wsgiref less fragile against environment changes by other tests
........
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rwxr-xr-x | Lib/test/test_wsgiref.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index 438d8ec..0b1a637 100755 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -9,7 +9,9 @@ from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, demo_app from wsgiref.simple_server import make_server from io import StringIO, BytesIO, BufferedReader from socketserver import BaseServer -import re, sys +import os +import re +import sys from test import support @@ -444,6 +446,11 @@ class HeaderTests(TestCase): class ErrorHandler(BaseCGIHandler): """Simple handler subclass for testing BaseHandler""" + # BaseHandler records the OS environment at import time, but envvars + # might have been changed later by other tests, which trips up + # HandlerTests.testEnviron(). + os_environ = dict(os.environ.items()) + def __init__(self,**kw): setup_testing_defaults(kw) BaseCGIHandler.__init__( |