diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-22 00:39:46 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-22 00:39:46 +0200 |
commit | 1e440cf5a267ce1787aa048525d45eb56fc06135 (patch) | |
tree | 4ffa3bf47f07f129bf502d6c1cc081190f642abe /Lib/test/test_multiprocessing.py | |
parent | 9e6b97502f3a0c5f7d24e0b7f05dc9b41b0d0b85 (diff) | |
download | cpython-git-1e440cf5a267ce1787aa048525d45eb56fc06135.tar.gz |
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 aa985e30bb..5760969598 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -1968,7 +1968,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() @@ -2006,7 +2006,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 @@ -2478,7 +2478,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() @@ -3235,9 +3235,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 = {} |