Kaydet (Commit) d6fcd562 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Merged revisions 76090 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r76090 | antoine.pitrou | 2009-11-03 18:20:10 +0100 (mar., 03 nov. 2009) | 9 lines

  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
  ........
................
üst 180221f0
...@@ -9,7 +9,9 @@ from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, demo_app ...@@ -9,7 +9,9 @@ from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, demo_app
from wsgiref.simple_server import make_server from wsgiref.simple_server import make_server
from io import StringIO, BytesIO, BufferedReader from io import StringIO, BytesIO, BufferedReader
from socketserver import BaseServer from socketserver import BaseServer
import re, sys import os
import re
import sys
from test import support from test import support
...@@ -444,6 +446,11 @@ class HeaderTests(TestCase): ...@@ -444,6 +446,11 @@ class HeaderTests(TestCase):
class ErrorHandler(BaseCGIHandler): class ErrorHandler(BaseCGIHandler):
"""Simple handler subclass for testing BaseHandler""" """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): def __init__(self,**kw):
setup_testing_defaults(kw) setup_testing_defaults(kw)
BaseCGIHandler.__init__( 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