cpython: 0518f32cb747 (original) (raw)

--- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -33,16 +33,15 @@ except ImportError: "verbose", "use_resources", "max_memuse", "record_original_stdout", "get_original_stdout", "unload", "unlink", "rmtree", "forget", "is_resource_enabled", "requires", "find_unused_port", "bind_port",

+ +IPV6_ENABLED = _is_ipv6_enabled() +

decorator for skipping tests on non-IEEE 754 platforms

requires_IEEE_754 = unittest.skipUnless( float.getformat("double").startswith("IEEE"),

--- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -873,7 +873,7 @@ class TestTimeouts(TestCase): def test_main(): tests = [TestFTPClass, TestTimeouts]

--- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -24,18 +24,6 @@ try: except ImportError: fcntl = False -def try_address(host, port=0, family=socket.AF_INET):

- def linux_version(): try: # platform.release() is something like '2.6.33.7-desktop-2mnb' @@ -46,7 +34,6 @@ def linux_version(): HOST = support.HOST MSG = 'Michael Gilfix was here\u1234\r\n'.encode('utf-8') ## test unicode string and carriage return -SUPPORTS_IPV6 = socket.has_ipv6 and try_address('::1', family=socket.AF_INET6) try: import _thread as thread @@ -645,7 +632,7 @@ class GeneralModuleTests(unittest.TestCa socket.getaddrinfo('localhost', 80) socket.getaddrinfo('127.0.0.1', 80) socket.getaddrinfo(None, 80)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -523,6 +523,10 @@ Extensions Tests ----- +- Issue #11811: Factor out detection of IPv6 support on the current host