mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
70eb79c669
commit
9c39f3c4ec
4 changed files with 28 additions and 23 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue