From: Serhiy Storchaka Date: Mon, 4 Jun 2018 03:36:15 +0000 (+0300) Subject: [3.6] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7375) X-Git-Tag: v3.6.6rc1~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e601c54d9d5f03f1fe1f7b4a1f2cb8e843fdeae;p=python [3.6] bpo-33759: Fix test.test_xmlrpc.ServerProxyTestCase. (GH-7362) (GH-7375) It depended on a global variable set by other tests.. (cherry picked from commit 7cfd8c6a1b53a7dbdea14b6f414f2629dcd130a2) Co-authored-by: Serhiy Storchaka --- diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py index f9bf304010..07f7ba0f00 100644 --- a/Lib/test/test_xmlrpc.py +++ b/Lib/test/test_xmlrpc.py @@ -1179,13 +1179,9 @@ class GzipUtilTestCase(unittest.TestCase): 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)