mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
[3.6] Stop test_xmlrpc from writing to sys.stderr (GH-3359) (#3380)
One test case of test_xmlrpc uses HTTPServer with a subclass of
BaseHTTPRequestHandler. The BaseRequestHandler class logs to
sys.stderr by default. Override log_message() to not clobber
test output.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 3463ee3972
)
This commit is contained in:
parent
6da379bde3
commit
3aea3c298b
1 changed files with 4 additions and 0 deletions
|
@ -328,6 +328,10 @@ class XMLRPCTestCase(unittest.TestCase):
|
||||||
self.handled = True
|
self.handled = True
|
||||||
self.close_connection = False
|
self.close_connection = False
|
||||||
|
|
||||||
|
def log_message(self, format, *args):
|
||||||
|
# don't clobber sys.stderr
|
||||||
|
pass
|
||||||
|
|
||||||
def run_server():
|
def run_server():
|
||||||
server.socket.settimeout(float(1)) # Don't hang if client fails
|
server.socket.settimeout(float(1)) # Don't hang if client fails
|
||||||
server.handle_request() # First request and attempt at second
|
server.handle_request() # First request and attempt at second
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue