Commit b3c169b0 authored by Antoine Pitrou's avatar Antoine Pitrou

Try to make test_wsgiref less fragile against environment changes by other tests

parent 5b54432b
......@@ -9,7 +9,9 @@ from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, demo_app
from wsgiref.simple_server import make_server
from StringIO import StringIO
from SocketServer import BaseServer
import re, sys
import os
import re
import sys
from test import test_support
......@@ -386,6 +388,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__(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment