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)
commit1e440cf5a267ce1787aa048525d45eb56fc06135 (patch)
tree4ffa3bf47f07f129bf502d6c1cc081190f642abe /Lib/test/test_asyncore.py
parent9e6b97502f3a0c5f7d24e0b7f05dc9b41b0d0b85 (diff)
downloadcpython-1e440cf5a267ce1787aa048525d45eb56fc06135.zip
cpython-1e440cf5a267ce1787aa048525d45eb56fc06135.tar.gz
cpython-1e440cf5a267ce1787aa048525d45eb56fc06135.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.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 878b26c..5d0632e 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,8 +19,6 @@ try:
except ImportError:
threading = None
-HOST = support.HOST
-
HAS_UNIX_SOCKETS = hasattr(socket, 'AF_UNIX')
class dummysocket:
@@ -809,7 +807,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):