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
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__(