Issue #11811: Factor out detection of IPv6 support on the current host

and make it available as `test.support.IPV6_ENABLED`.  Patch by
Charles-François Natali.
This commit is contained in:
Antoine Pitrou 2011-04-28 19:18:10 +02:00
parent 70eb79c669
commit 9c39f3c4ec
4 changed files with 28 additions and 23 deletions

View file

@ -873,7 +873,7 @@ class TestTimeouts(TestCase):
def test_main():
tests = [TestFTPClass, TestTimeouts]
if socket.has_ipv6:
if support.IPV6_ENABLED:
try:
DummyFTPServer((HOST, 0), af=socket.AF_INET6)
except socket.error: