diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-21 22:39:46 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-21 22:39:46 (GMT) |
commit | f6fbf5607155b2dcd517059c8067305c4d015b00 (patch) | |
tree | 49d363b0218c7c9d8c36a64f029ca45ed49cf905 /Lib/test/_test_multiprocessing.py | |
parent | 13423c3726ac4aa42125ac49e6c5038a015fe3eb (diff) | |
download | cpython-f6fbf5607155b2dcd517059c8067305c4d015b00.zip cpython-f6fbf5607155b2dcd517059c8067305c4d015b00.tar.gz cpython-f6fbf5607155b2dcd517059c8067305c4d015b00.tar.bz2 |
Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions.
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index f9be810..d1c7f0b 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -1999,7 +1999,7 @@ class _TestRemoteManager(BaseTestCase): authkey = os.urandom(32) manager = QueueManager( - address=('localhost', 0), authkey=authkey, serializer=SERIALIZER + address=(test.support.HOST, 0), authkey=authkey, serializer=SERIALIZER ) manager.start() @@ -2037,7 +2037,7 @@ class _TestManagerRestart(BaseTestCase): def test_rapid_restart(self): authkey = os.urandom(32) manager = QueueManager( - address=('localhost', 0), authkey=authkey, serializer=SERIALIZER) + address=(test.support.HOST, 0), authkey=authkey, serializer=SERIALIZER) srvr = manager.get_server() addr = srvr.address # Close the connection.Listener socket which gets opened as a part @@ -2509,7 +2509,7 @@ class _TestPicklingConnections(BaseTestCase): l.close() l = socket.socket() - l.bind(('localhost', 0)) + l.bind((test.support.HOST, 0)) l.listen(1) conn.send(l.getsockname()) new_conn, addr = l.accept() @@ -3151,9 +3151,9 @@ class TestWait(unittest.TestCase): def test_wait_socket(self, slow=False): from multiprocessing.connection import wait l = socket.socket() - l.bind(('', 0)) + l.bind((test.support.HOST, 0)) l.listen(4) - addr = ('localhost', l.getsockname()[1]) + addr = l.getsockname() readers = [] procs = [] dic = {} |