[Python-checkins] Stop test_xmlrpc from writing to sys.stderr (#3359)
Christian Heimes
webhook-mailer at python.org
Wed Sep 6 00:43:49 EDT 2017
https://github.com/python/cpython/commit/3463ee3972e0d14351ee18bce60ecfbf7ac96772
commit: 3463ee3972e0d14351ee18bce60ecfbf7ac96772
branch: master
author: Christian Heimes <christian at python.org>
committer: GitHub <noreply at github.com>
date: 2017-09-05T21:43:46-07:00
summary:
Stop test_xmlrpc from writing to sys.stderr (#3359)
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 at python.org>
files:
M Lib/test/test_xmlrpc.py
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 74a46ba883a..a609eef503f 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -328,6 +328,10 @@ def do_POST(self):
self.handled = True
self.close_connection = False
+ def log_message(self, format, *args):
+ # don't clobber sys.stderr
+ pass
+
def run_server():
server.socket.settimeout(float(1)) # Don't hang if client fails
server.handle_request() # First request and attempt at second
More information about the Python-checkins
mailing list