summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-21 22:39:46 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-21 22:39:46 (GMT)
commitf6fbf5607155b2dcd517059c8067305c4d015b00 (patch)
tree49d363b0218c7c9d8c36a64f029ca45ed49cf905 /Lib/test/test_asyncore.py
parent13423c3726ac4aa42125ac49e6c5038a015fe3eb (diff)
downloadcpython-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_asyncore.py')
-rw-r--r--Lib/test/test_asyncore.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index c02a976..87655f4 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -10,7 +10,7 @@ import errno
import struct
from test import support
-from test.support import TESTFN, run_unittest, unlink
+from test.support import TESTFN, run_unittest, unlink, HOST, HOSTv6
from io import BytesIO
from io import StringIO
@@ -19,7 +19,6 @@ try:
except ImportError:
threading = None
-HOST = support.HOST
TIMEOUT = 3
HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX')
@@ -816,7 +815,7 @@ class TestAPI_UseIPv4Sockets(BaseTestAPI):
@unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 support required')
class TestAPI_UseIPv6Sockets(BaseTestAPI):
family = socket.AF_INET6
- addr = ('::1', 0)
+ addr = (HOSTv6, 0)
@unittest.skipUnless(HAS_UNIX_SOCKETS, 'Unix sockets required')
class TestAPI_UseUnixSockets(BaseTestAPI):