summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-09-06 17:22:14 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2017-09-06 17:22:14 (GMT)
commit3aea3c298b510fffac0f33195c7380a19c60f4e2 (patch)
treee7245495e189a46a351b1d556cd8f60fd956aa0f /Lib/test
parent6da379bde345926e1f7318ead973767f4d791d3e (diff)
downloadcpython-3aea3c298b510fffac0f33195c7380a19c60f4e2.zip
cpython-3aea3c298b510fffac0f33195c7380a19c60f4e2.tar.gz
cpython-3aea3c298b510fffac0f33195c7380a19c60f4e2.tar.bz2
[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 3463ee3972e0d14351ee18bce60ecfbf7ac96772)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xmlrpc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 30025e3..e98a3a7 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -328,6 +328,10 @@ class XMLRPCTestCase(unittest.TestCase):
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