diff --git a/radicale/tests/test_server.py b/radicale/tests/test_server.py index 68f05b4..af88459 100644 --- a/radicale/tests/test_server.py +++ b/radicale/tests/test_server.py @@ -26,7 +26,6 @@ import ssl import tempfile import threading import time -import warnings from urllib import request from urllib.error import HTTPError, URLError @@ -109,10 +108,11 @@ class TestBaseServerRequests: assert status == 302 def test_ipv6(self): - if not server.HAS_IPV6: + if (not server.HAS_IPV6 or os.environ.get("TRAVIS_OS_NAME") == "osx" or + os.environ.get("TRAVIS_SUDO") == "true"): pytest.skip("IPv6 not support") - if os.name == "nt" and os.environ.get("WINE_PYTHON"): - warnings.warn("WORKAROUND: incomplete errno conversion in WINE") + if os.name == "nt" and server.EAI_ADDRFAMILY is None: + # HACK: incomplete errno conversion in WINE server.EAI_ADDRFAMILY = -9 with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as sock: sock.setsockopt(server.IPPROTO_IPV6, server.IPV6_V6ONLY, 1)