From f97c310a9562727e0a7c42fb9f7af4d378e4098b Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Thu, 20 Sep 2018 17:53:31 +0300 Subject: [PATCH] bpo-19756: Prevent test failures due to EADDRNOTAVAIL --- Lib/test/support/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 19701cf388fe4e3..ed0d46de6426d61 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1426,6 +1426,9 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()): ('EHOSTUNREACH', 113), ('ENETUNREACH', 101), ('ETIMEDOUT', 110), + # socket.create_connection() fails randomly with + # EADDRNOTAVAIL on Travis CI. + ('EADDRNOTAVAIL', 99), ] default_gai_errnos = [ ('EAI_AGAIN', -3),