[Python-checkins] [2.7] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7374)
Ned Deily
webhook-mailer at python.org
Sun Jun 3 23:39:03 EDT 2018
https://github.com/python/cpython/commit/93ba6da27eed980600a874dfeffb2856fe1d4126
commit: 93ba6da27eed980600a874dfeffb2856fe1d4126
branch: 2.7
author: Serhiy Storchaka <storchaka at gmail.com>
committer: Ned Deily <nad at python.org>
date: 2018-06-03T23:39:00-04:00
summary:
[2.7] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7374)
It depended on a global variable set by other tests..
(cherry picked from commit 7cfd8c6a1b53a7dbdea14b6f414f2629dcd130a2)
Co-authored-by: Serhiy Storchaka <storchaka at gmail.com>
files:
M Lib/test/test_xmlrpc.py
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 97d9e8f789cd..36b3be67fd6b 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -854,13 +854,9 @@ def test_gzip_decode_limit(self):
class ServerProxyTestCase(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
- if threading:
- self.url = URL
- else:
- # Without threading, http_server() and http_multi_server() will not
- # be executed and URL is still equal to None. 'http://' is a just
- # enough to choose the scheme (HTTP)
- self.url = 'http://'
+ # Actual value of the URL doesn't matter if it is a string in
+ # the correct format.
+ self.url = 'http://fake.localhost'
def test_close(self):
p = xmlrpclib.ServerProxy(self.url)
More information about the Python-checkins
mailing list